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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pop up a window for the linkbutton

Status
Not open for further replies.

compu66

Programmer
Dec 19, 2007
71
US
Hi all,

I have a linkbutton,how to pop up a javascript for it.

I tried but it does come up.
btnSave.Attributes.Add("onclick", "javascript:ShowAlert();")

Thanks for any help in advance
 
Code:
btnSave.onclick = ShowAlert;

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.

Webflo
 
or [tt][maroon]btnSave.onclick = function () {ShowAlert();};[/maroon][/tt] if you want to add arguments to the function.

- Lowet

[gray]Why can't all browsers parse pages the same way? It should be the Web designer who decides how to display the content, not the browser![/gray]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top