Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » ASP 3.0




 Page 1 of 1 [ 4 posts ] 



Author Message
 Post subject: Can "a href" trigger a code behind a function?
 Post Posted: Sun Nov 22, 2009 2:43 pm 
Offline

Joined: Sat Feb 21, 2009 10:48 am
Posts: 9
hello!!!! evry one!!,

From ma "a href" contrl on aspx, was it possible 2 wire a
code-behind event handler?

Code:
   1. <a id="dddd" href="#" runat="server" onclick="dddd_Click(this.id)"> 


I have tried dis , but that didnot work. I guess onclick is 4 da
clientside scripts. Is there neone around 2 invoke the
code-behind function?


Top 
 Post subject: Re: Can "a href" trigger a code behind a function?
 Post Posted: Sun Nov 22, 2009 2:44 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
try includn a runat="server" nd then double click on da link in da
designer, 2 wire up da event.


Top 
 Post subject: Re: Can "a href" trigger a code behind a function?
 Post Posted: Sun Nov 22, 2009 2:44 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
Yes, d a attribute was "OnServerClick". I do da followin
for a logout link (which needs to execute a "Logout" funciton server side to dispose the session and cookies):


Top 
 Post subject: Re: Can "a href" trigger a code behind a function?
 Post Posted: Sun Nov 22, 2009 2:45 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
hi,

i was worried abt why u didnot use da hyperlink field..................

yes onclick is 4 da clientside scripts.

Thanks.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 4 posts ] 




Board index » Server Side Development » ASP 3.0


Who is online

Users browsing this forum: No registered users and 3 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron