Ask a Question related to ASP.NET General, Design and Development.
-
psinyc #1
ASP.NET Reset Controls to default values question
this may be a simple thing ... I am trying to reset all
the page controls to their original setting, in the first
line of this method call (event). I want to dynamically
change the days of month in a dropdownlist list depending
on the users selected month in the month's
dropdownlist ... i am using AutoPostBack on the
dropdownlists ... can anyone offer suggestions? Thanks ..
here's the method ..
private void ddlStartMonth_SelectedIndexChanged(object
sender, System.EventArgs e)
{
// need to reset all page controls to original setting
if (ddlStartMonth.SelectedItem.Value == "2")
{
ddlStartDay.Items.RemoveAt(33);
ddlStartDay.Items.RemoveAt(32);
ddlStartDay.Items.RemoveAt(31);
}
else if (ddlStartMonth.SelectedItem.Value == "4")
{
ddlStartDay.Items.RemoveAt(33);
}
else if (ddlStartMonth.SelectedItem.Value == "6")
{
ddlStartDay.Items.RemoveAt(33);
}
else if (ddlStartMonth.SelectedItem.Value == "9")
{
ddlStartDay.Items.RemoveAt(33);
}
else if (ddlStartMonth.SelectedItem.Value == "11")
{
ddlStartDay.Items.RemoveAt(33);
}
}
what happens is the first month selected works, but now
the items have been removed from the dropdownlist, so the
second time the method is called, it's not working with
the full, default 31 day dropdownlist.
Sorry for the lengthy post, thanks ..
psinyc
psinyc Guest
-
How to reset values with a webservice ?
I want to write a webservice that allows to reset values in the database of my back office. I don't have any idea of how to pass information to set... -
Specifying dynamic default values for properties in custom controls:
Hey guys, I have a custom int property in my control whose default value is dynamic, so I cannot specify a "DefaultValue" attribute. However, I... -
Lost Layers Palette; Reset Palette Layout to Default?
I don't know why, but suddenly my layers palette has disappeared. Everything I've tried has not worked. This includes: 1. Hitting F7: nothing... -
How to delete or reset Mozilla default printer
I'm running Debian testing with Mozilla 1.0. I installed and ran mozilla before I had my printing system setup. Probably because of this, it now... -
Reset default CD-R options
Greets - How do I reset the default action when inserting a blank cd-r into a PowerBook running OSX 10.2.6? I've got it set to go to the Finder...



Reply With Quote

