asp.net : removing selecteditem dropdownlist maintaining list items
here's issue..
i have little page label, dropdownlist quarrel button.
<div>
<asp:label id="message" runat="server"/>
<br />
city wish feeling during hotels for?<br /><br />
<asp:dropdownlist id="dropdownlist1" runat="server" enableviewstate="true">
</asp:dropdownlist>
<br /><br /><br /><br />
<input type="submit" />
</div>
on form bucket i am inserting equipment dropdownlist symbol click i am displaying count equipment dropdownlist. here's formula that.
(page.ispostback)
{
message.text = "you have comparison " + dropdownlist1.items.count.tostring();
}
else
{
message.text = "you have comparison " + dropdownlist1.items.count.tostring();
dropdownlist1.items.add("madrid");
dropdownlist1.items.add("chennai");
dropdownlist1.items.add("new york");
}
here's humorous part. i run directly ide, the operative ideally fine. i count 0 initial 3 i press quarrel button. i need run little formula an existent practical directory. i run same aspx page within practical directory, i count 0 for initial loads. i click submit, i count 0 i don't any equipment dropdownlist, removing cleared. i have set viewstate loyal i remember inserted.
i am certain inadequacy there i run ide i run another practical directory. i am sincerely new asp.net i have exhuasted options here out dropdownlist works. there config i am blank here ?.
btw only fyi, i am opposed same emanate i put dropdownlist sorceress control. run ide operative glorious nonetheless i run practical office the removing comparison value conjunction remembering equipment dropdownlist.
any assistance appreciated.
sorry :(, integrate some-more questions
according your formula list wholly gets populated postback. therefore click symbol list empty.if boldly stock list, equipment remembered. contingency total any page_load. perspective state wholly remember vigilant selected.
how does following remember equipment page executed directly ide remember i run practical directory. there perspective state i competence need set working. cache sourroundings also many luck. i enabled snippet info, humorous thing again :|, tracing duty executed directly ide virual directory. doubt again, child directory's web.config should overrule progenitor web.config right ?
thanks replying.
Comments
Post a Comment