_doPostBack jscript with dropdownList manually

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top