-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: HarshadP
Message 1 in Discussion
Hello friends,
Currently I am developing ASP.NET Page.
Here I am tyring to select a ListItem of dropdownList
A pseudo code for it as below
/*****************************************************************************************************************************************/
ListItem
ProdCityItem=ddlProductionCity.Items.FindByText(Member.CurrentMemberLocationRecord.City.ToString());
ddlProductionCity.ClearSelection();
if (ProdCityItem!=null)
{
ProdCityItem.Selected=true;
}
ProdCityItem=null;
/*****************************************************************************************************************************************/
But still I am getting error
A DropDownList cannot have multiple items selected.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Web.HttpException: A DropDownList cannot have
multiple items selected.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can be
identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A DropDownList cannot have multiple items
selected.] System.Web.UI.WebControls.DropDownList.RenderContents(HtmlTextWriter
writer) +325 System.Web.UI.WebControls.WebControl.Render
(HtmlTextWriter writer) +29 System.Web.UI.Control.RenderControl(HtmlTextWriter
writer) +243 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +262
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render
(HtmlTextWriter writer) +7 System.Web.UI.Control.RenderControl(HtmlTextWriter
writer) +243 System.Web.UI.Page.ProcessRequestMain() +1929
Can anyone suggest me how to get rid of this problem
--
Warm Regards,
Harshad
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]