Re: DDLB user control.. wherre to put code..

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Adrian Parker (apparker_at_nospam.com)
Date: 04/05/04


Date: Mon, 5 Apr 2004 09:16:00 +0100

As I explained, the dropdowns are in a usercontrol, not the main page.. so I can't do the select on the main page in a changed
event as it doesn't exist.

""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message news:UEUCO96FEHA.3244@cpmsftngxa06.phx.gbl...
> Hi Adrian,
>
> Thanks very much for your feedback.
>
> Ok, after your further describing, I understand what you need. You need to
> get the selection value of the dropdownlists, then use them to retrieve
> database data.
>
> Can you do such things(such as database data retriving) not in Page.Load
> event, but in DropDownList.SelectedIndexChanged event? Then you can
> retrieve the updated selection item.
>
> If you can only do such things in Page.Load, can you show me what exactly
> you want to do, maybe I can find some workaround for you. Thanks.
>
> Also, you may retrieve the DropDownList new selection value in Page.Load
> event through HttpRequest object, do like this:
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> this.Response.Write(this.Request.Form["DropDownList1"]);
> }
>
> The "DropDownList1" is the dropdownlist's client html "name" attribute.
>
> Although you can do like this to workaround your issue, I do not recommand
> you do like this. This is the legacy ASP solution, and will break the well
> formed Asp.net server side control model, and is somewhat ugly. So please
> tell try my first suggestion.
>
> Thank you for your patience and cooperation. If you have any questions or
> concerns, please feel free to post it in the group. I am standing by to be
> of assistance.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Relevant Pages

  • Re: DDLB user control.. wherre to put code..
    ... get the selection value of the dropdownlists, ... retrieve the updated selection item. ... Although you can do like this to workaround your issue, ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Refer to dynamically generated objects during page load
    ... to generate some multiple selection dropdowns. ... and assign the serialization of the document tree to `innerHTML'. ... listbox B where the contents of this listbox is chosen according to a selection in listbox A. ...
    (comp.lang.javascript)
  • Re: Refer to dynamically generated objects during page load
    ... to generate some multiple selection dropdowns. ... You can manipulate that document ... and assign the serialization of the document tree to `innerHTML'. ...
    (comp.lang.javascript)
  • Re: method to avoid the "screen-flicker-refresh" of postbacks?
    ... i have a section of a page that has multiple dropdowns. ... each dropdown calls the same method on a change of selection by the ... the method loops over all the dropdowns and if the newly ... screen to refresh and display the page at the top (same position as ...
    (microsoft.public.dotnet.framework.aspnet)
  • method to avoid the "screen-flicker-refresh" of postbacks?
    ... i have a section of a page that has multiple dropdowns. ... each dropdown calls the same method on a change of selection by the ... screen to refresh and display the page at the top (same position as ...
    (microsoft.public.dotnet.framework.aspnet)