Hi, I have a datagrid with in one column a linkbutton. This linkbutton will be used to open a popup with some details. In the itemdatabound event I couple the onclick javascript event to the linkbutton but I want to remove the href attribute because that part
holds a __dopostback so my page automatically does a roundtrip after closing the popup (modal window). I used the attributes.remove("href") on the button but that doesn't seem to do the trick. Is there a way to accomplish this? Thx, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
I think, if you add "return false;" to the javascript in the onclick, the PostBack won't happen.
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
XIII
All-Star
182714 Points
23466 Posts
ASPInsiders
Moderator
MVP
column with linkbutton problem
Aug 13, 2003 08:16 AM|LINK
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
kdphad
Member
420 Points
79 Posts
Re: column with linkbutton problem
Aug 06, 2012 10:30 AM|LINK
please check this post - http://forums.asp.net/t/1534463.aspx/1?Execute+server+side+button+event+after+executing+javascript+code
Please remember to click “Mark as Answer” on the post that helps you
superguppie
All-Star
48225 Points
8679 Posts
Re: column with linkbutton problem
Aug 07, 2012 07:14 AM|LINK
I think, if you add "return false;" to the javascript in the onclick, the PostBack won't happen.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.