Calling a Javascript function using VB.NET Codebehind

R

rahulkate

Hello Everybod

I have a problem hope you can help me out

I have a treeview and on the selectedindexchange event of the treeview I want to execute some code from the vb codebehind file and a javascript function which is there in the HTML file.I am using VB.NET as the language. Now If I want to execute both these codes I need to click the nodes twice. I had Added the attributes to the treeview. something like this in the Page_load even
TreeView1.Attributes.Add("onselectedindexchange", "Showme();"
Also trie
TreeView1.Attributes.Add ("onselectedindexchange", "javascript:Showme();"
Also trie
Response.Write("<script language='javascript'>Showme();</script>"
but it doesnot work.
I WANT TO CALL THE FOLLOWING CODE IN ASP.NET HOW DO I DO THIS PLEASE HELP

parent.frames("Frame3").location.replace("Webform4.aspx")

So as a solution to this What I did is i added a Button added attribute of the same function to it. Now I want to call the Button_click(ByVal Sender as System.Object,ByVal e as Event.Args) event from the treeview_selectedindexchange () event. What Arguments should I pass in order to execute this button_click() event. I mean to say is what would be the Sender and what will be the event args in this case. Please Help, Its very Urgent

Regards & Thanks
Rahu
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top