brucegonewild
Programmer
Hi there,
Firstly, I am quite clear about the differences between the Server-side and client-side controls and how the code in the server and the one on the client-side are totally different
Now as for my question:
I have 3 web-user controls, call them: uc1, uc2, uc3.
I have a main page to contain these webuser-controls, call it, Main.
There's a master page that makes a RunStartupScript("Save") call and my Main, has a JavaScript function that calls the "accessors" in uc1, uc2 and uc3 to get their form-control values. Here's how I do this:
Here's the problem:
There are certain controls in uc1, uc2 and uc3 which are HTML-controls and I can't use "Runat='server'" on any of those html-controls. So given that I can interact between my JavaScript and Code-behind through <%= %>, I need to know if there's a way to go the other way, and get my Client-side controls in code behind.
Thanks in advance for your help!
Firstly, I am quite clear about the differences between the Server-side and client-side controls and how the code in the server and the one on the client-side are totally different
Now as for my question:
I have 3 web-user controls, call them: uc1, uc2, uc3.
I have a main page to contain these webuser-controls, call it, Main.
There's a master page that makes a RunStartupScript("Save") call and my Main, has a JavaScript function that calls the "accessors" in uc1, uc2 and uc3 to get their form-control values. Here's how I do this:
Code:
//this is a JavaScript function that Master calls through a "RunStartupScript" function-call:
function Save()
{
var val1 = "<%= Get_uc1_value1() %>"
var val2 = "<%= Get_uc1_value2() %>"
}
NOTE: Get_ucX_value_Y() is a server-side function that returns something like: [i]this.ctrlname.value()[/i]
Here's the problem:
There are certain controls in uc1, uc2 and uc3 which are HTML-controls and I can't use "Runat='server'" on any of those html-controls. So given that I can interact between my JavaScript and Code-behind through <%= %>, I need to know if there's a way to go the other way, and get my Client-side controls in code behind.
Thanks in advance for your help!