[resolved]asp.net communicate with client side objs
is it possible to make asp.net controls communictte a client side object? how? for example i have a button in asp.net then it will execute a vb script on the client side? i know asp.net is in server side but my application is a combination of both...
is it possible?
Thanks,
Jewel
Re: asp.net communicate with client side objs
Re: asp.net communicate with client side objs
thanks this is a great article, i just browsed through it and it seems like the solution, still have to try it though..thanks a lot
Jewel
Re: asp.net communicate with client side objs
What about a simple Page.RegisterStartupScript and Page.RegisterClientScriptBlock?
Re: asp.net communicate with client side objs
hi registerstartupscript works but I don't know how to get the value of the variable inside the script from the code behind...
Thanks,
Jewel
Re: asp.net communicate with client side objs
Elaborate on what your requirements are. I am not sure what you mean by "value of the variable inside the script". When does this variable get set?
Re: asp.net communicate with client side objs
hi sorry my question was really messy...
HTML Code:
<script>
var strValue;
function PopWin()
{
strValue = txtVal.value;
}
</script>
is there a way for me to get the value of strValue from code behind?
Re: asp.net communicate with client side objs
Assign what's in strValue to a hidden field on your page. Then you can use your codebehind to look at it. (Make sure that the hidden field is runat="server" and all that stuff)
Re: asp.net communicate with client side objs
thanks...
got it to work...
:)
Re: asp.net communicate with client side objs
Add [Resolved] to the thread title.