_doPostBack jscript with dropdownList manually

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a dropdown list in a user control with values(10) from my DB. I also
have in this ascx other controls (DatePicker, TextBox...) to be filled.

But, if the user select one particular value from this dropdown, it
indicates to me that the user control have to hide some fields and add others.

So, all I want is to make a _postback to the server to redefines the form
only with this particular value.

Otherwise, if the user choose all the other values, he can continue to fill
the fields and push on the Submit button at the end for the postback.

Tks all
 
Well,

I really don't know how to do this.

In my User Control Page_Load I know I have to do someting like that
ddlTypeTransaction.Attributes.Add("onchange", "??");

?? don't know exactly what do here

On my Default page I have this too
HtmlGenericControl Include = new HtmlGenericControl("script");
Include.Attributes.Add("type", "text/javascript");
Include.Attributes.Add("src", Page.ResolveUrl("~/Scripts/jlr.js"));
this.Page.Header.Controls.Add(Include);

So now, I have to write a javascript function to handle my ddl, verify my
value
and then do a submit if it's necessary.
 
Back
Top