Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chiragvm
Yak Posting Veteran
65 Posts |
Posted - 2006-08-29 : 06:00:52
|
hello to all of ui want to call a one vb script (public sub key ) this is writen in a vbcode (asp.net)on one html button (ADD key) whne click on call one java script in wich java script i want to call a vb script <script language java>function add{ heare i want to call (public sub key)} |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-08-29 : 13:49:56
|
Are you trying to call a server side method?Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
chiragvm
Yak Posting Veteran
65 Posts |
Posted - 2006-08-31 : 04:19:12
|
yes i want to call server side method if possible so please send codequote: Originally posted by dfiala Are you trying to call a server side method?Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP
|
 |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-08-31 : 09:36:24
|
You can only call a server side method by posting back in some way (this could include an ajax call). But, ASP.NET already has all this wired in, and creates the javascript for you to have a button click on the form, post back and execute a method on the server.instead of standard Html Button use the ASP.NET button on your form.<asp:Button ID="DoSomething" runat="server" Text="Do it!"/>Your server side code should have something that looks like this... Private Sub DoSomething_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DoSomething.Click 'Your server side code here End SubThat's all there is to it. When ASP.NET creates the page, it generates all the necessary javascript for you to postback and call the method.Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
|
|
|