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
Eliyahu Goldin - 30 Aug 2007 18:23 GMT
You will need to handle javascript onchange event for the ddl. Detect in the
event when the desired item is selected and call myForm.submit(). This will
initiate a postback.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Hi,
>
[quoted text clipped - 14 lines]
>
> Tks all
Ghistos - 30 Aug 2007 18:42 GMT
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.
Ghistos - 30 Aug 2007 19:48 GMT
Well,
tks, I find my solution
> Hi,
>
[quoted text clipped - 11 lines]
>
> Tks all