Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink to code behind function? 1

Status
Not open for further replies.

tommyboyau

Programmer
Feb 7, 2005
47
AU
Hi guys,
This is a simple one i'm sure. I'm very new to the game:
Lets say I want to make a hyperlink to log the user out on the page, what should I have in the .aspx to link to a function in the .aspx.vb file?
In the .aspx.vb file I have a function or procedure which will do the following effectively loggin the user out:
Function logOut()
Session("Logged_IN") = "No"
Session("UserLevel") = 0
Response.Redirect("Login.aspx")
End Function
 
I have found no way to do that. If you want to use a hyperlink, then set the NavigateURL property "Login.aspx". Then in your page_load event of Login.asp, run your function. Note, the function must be placed in the Login.asp page or a class file.

Jim
 
Good idea.
I think i'll just make a new page called logout.aspx and put it in the page_load of that :)

Thanks for your help,

Tom
 
You could just use a LinkButton...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top