|
-
Aug 12th, 2007, 08:10 AM
#26
New Member
Re: [RESOLVED] Javascript - pass variable to VB.net(2003)
according to this code, how can i trigger a function in the code behind file when the hidden value changes in the script???
i tried the hidden events but it didn't work & i couldn't know wht's wrong with it
The only solution is to assign value to a control and then read it using js.
Here is the sample what I did,
In the aspx page:
1. Create a hidden control
<INPUT id="name_hidden" type="hidden" runat="server">
2. Read the hidden control value(session variable)
var varName=document.getElementById('name_hidden').value;
In the Code behind file:
3. Set the value for hidden control on run time
name_hidden.Value = Session("UserName")
Hope it will work for you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|