I have a lot of controls...and in runtime i need asign&run custom server validators.
For example, i have a edit. In this, the user write a code, like "1". Then, i need go to the server (i need post the whole form in this case), run a function inside a dll made by the user, get the data and re-asign the data to the form, show error&warning if any, and put the validity of the form as well... But with this control, i need do a little of jscript here becuase is pluged with a combo, and if the data is not in it, then i need show another form and cancel the process...
So, i put in a jscript function:
function AsignarSeleccionado(combo,edit,postback){
edit.value=combo.value;
if (postback==true) {
//window.Form1.submit();
__doPostBack(combo.id,"");
}
}
That work well, but when the form is posted to the server, the OnChange event of the edit is not fired. I try implementing IPostBackEventHandler.RaisePostBackEvent but the server not fire this event...
I need a way to solve it. in short:
- From a JSCript code, fire the postback
- In the server, catch that i do a postback from x control
- Run the custom code, rebind and back.
Also, i don't see how put optionaly the fire event (that it, put this process in some controls and in others not)
Thank for your time...
The Life is Beautiful!
Programmer in
Delphi, VS.NET
MCP