Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 686

Set value of variable upon hyperlink click - ASP.net

$
0
0
Hi guys, I've currently got a listview on a asp.net webpage that displays "cottage" records from an access database. The name of each cottage is displayed as a hyperlink so when clicked brings you to another webpage. Below is the asp code for the name of the cottage.
Code:

<li style="">Name:
                <asp:Hyperlink ID="Cottage_NameLabel" NavigateURL="~/Cottage.aspx" runat="server"
                    Text='<%# Eval("Cottage_Name") %>' />
                <br />

This works perfectly fine when selecting a hyperlink. What I want the system to do is to set the value of a publically declared variable (set in a module) to the "Cottage_Name" of the selected hyperlink. So say if i clicked on a hyperlink that said "cottage1", the public variable is set to cottage1 and then the navigate url opens the next webpage.

Would really appreciate it if anyone could help me do this!
Thankyou:D

Viewing all articles
Browse latest Browse all 686

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>