|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Div and code behind on click eventI am trying to use a div as a quasi button and need to use server side
code to navigate. Any ideas on how to accomplish this? Thanks Ken You can build a custom control and implement IPostBackEventHandler. The IPostBackEventHandler.RaisePostBackEvent
will get called when your custom control causes a postback. It will cause a postback when you execute the javascript returned from Page.GetPostBackClientEvent. So attach the returned javascript to your div's onclick. Here are some MSDN docs to get you started: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiipostbackeventhandlerclassraisepostbackeventtopic.asp -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > I am trying to use a div as a quasi button and need to use server side > code to navigate. Any ideas on how to accomplish this? > > Thanks > Ken Brock Allen wrote:
Show quoteHide quote > You can build a custom control and implement IPostBackEventHandler. Thanks for the info. This helped a lot.> The IPostBackEventHandler.RaisePostBackEvent will get called when > your custom control causes a postback. It will cause a postback when > you execute the javascript returned from Page.GetPostBackClientEvent. > So attach the returned javascript to your div's onclick. Here are > some MSDN docs to get you started: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref > /html/frlrfsystemwebuiipostbackeventhandlerclassraisepostbackeventtopi > c.asp > > -Brock > DevelopMentor > http://staff.develop.com/ballen > > > > > I am trying to use a div as a quasi button and need to use server > > side code to navigate. Any ideas on how to accomplish this? > > > > Thanks > > Ken Thanks Ken
03 dropdownlist selectedindexchanged not firing in usercontrol on
Why no richtextbox in Web Controls? Mystery ASP.NET Error htmlinputfile - accept AddHandler doesn't seem to work. Blinking Controls Gridview, using Callbacks when Sorting and Paging dataformatstring for dates in datagrid Dyamically add user control, along with properties? can you convert an in-memory bitmap render in a web control image ? |
|||||||||||||||||||||||