Ask a Question related to ASP.NET General, Design and Development.
-
Null #1
DropDownList and AutoPostback -- default item
Hello --
Is there a way to prevent the autopostback of a drop down list if there is a
"default" item in the list -- example, a drop down list where the first item
says "Select One" and the remaining items are all values available for
selection....if the user changes the selection I want to postback, unless
they are selecting the default item. Is there a way to do this using
autopostback? Or should I just use client side script and force a
form-submit when the value is changed?
Any tips or suggestions?
Thanks in advance!
Null Guest
-
Asp.net DropDownList, AutoPostBack, and ViewState
I'm trying to finish off do an ASP.NET project where a DropDownList box is used to access a Table. Once you Make a selection on an item in the... -
can't set the selected item of the dropdownlist
I generate template columns in datagrid dynamic and I want dropdownlist in the EditItemTemplate, I did it But I can't set the selected item of... -
AutoPostback DropDownList in EditItemTemplate
I have a dropdownlist as an item in my edititemtemplate. I need to populate a texbox in the same edititemtemplate with the contents of the... -
dropdownlist autopostback when editing in datagrid
I have multiple dropdownlists in edit mode of my datagrid. list 1 effects the members of list 2 i.e. list 1 --> department list 2 --> department... -
capture dropdownlist in edit mode autopostback
I have a datagrid that in edit mode shows a dropdownlist. I need to be able to postback and manipulate some of the edit template controls depending... -
S. Justin Gengo #2
Re: DropDownList and AutoPostback -- default item
Null,
You could use a required field validator. Set its "ControlToValidate"
property to true and set its "InitialValue" to "Select One" (no quotes).
This would keep the drop down from posting back unless the selection is
something other than "Select One".
The only problem with the above method is that if there are form fields for
submission the form won't submit unless a user selects a value from your
drop down first. If you need them to select one no matter what then this is
the best solution.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Null" <farthumstill@hotmail.com> wrote in message
news:eOJE2E2WDHA.1480@tk2msftngp13.phx.gbl...a> Hello --
>
> Is there a way to prevent the autopostback of a drop down list if there isitem> "default" item in the list -- example, a drop down list where the first> says "Select One" and the remaining items are all values available for
> selection....if the user changes the selection I want to postback, unless
> they are selecting the default item. Is there a way to do this using
> autopostback? Or should I just use client side script and force a
> form-submit when the value is changed?
>
> Any tips or suggestions?
>
> Thanks in advance!
>
>
S. Justin Gengo Guest



Reply With Quote

