Click here to Skip to main content
16,011,475 members
Home / Discussions / Web Development
   

Web Development

 
GeneralMethods in ASP Pin
Sarvesvara (BVKS) Dasa2-Oct-02 7:57
Sarvesvara (BVKS) Dasa2-Oct-02 7:57 
GeneralGetting Server Name Pin
Jason Weibel2-Oct-02 6:51
Jason Weibel2-Oct-02 6:51 
GeneralRe: Getting Server Name Pin
Paul Riley2-Oct-02 9:22
Paul Riley2-Oct-02 9:22 
GeneralRe: Getting Server Name Pin
Jason Weibel4-Oct-02 2:40
Jason Weibel4-Oct-02 2:40 
GeneralRe: Getting Server Name Pin
Paul Riley4-Oct-02 3:14
Paul Riley4-Oct-02 3:14 
GeneralCheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 2:39
leppie2-Oct-02 2:39 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 5:14
Paul Riley2-Oct-02 5:14 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 8:59
leppie2-Oct-02 8:59 
Paul Riley wrote:
I've just tried this out, thinking it must be something simple but I have exactly the same problem.

Guess you made the same mistake as me Smile | :)

I found out what I was doing wrong. In my page load event i was creating the checkboxes from an enum, BUT page load gets fired again before button click is handled (something I guess I have to keep in mind all the time). This was my solution:

private bool setup = true;

private void Page_Load(object sender, System.EventArgs e)
{
	try 
	{
		setup = (bool) ViewState["setup"];
	} 
	catch (System.NullReferenceException){}
	if (setup) SetupPage();
}

private void SetupPage()
{
	//do my stuff
	setup = false;
	ViewState["setup"] = setup;
}


Read setup as setup? (Do you want to setup?).... Smile | :) It looks a bit in reverse, but my logic prefers it. Maybe I should call it dosetup? Smile | :)

Hope this is the same problem as you have, else I'm clueless. Smile | :)

Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 9:20
Paul Riley2-Oct-02 9:20 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 9:37
leppie2-Oct-02 9:37 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 9:54
Paul Riley2-Oct-02 9:54 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 10:17
leppie2-Oct-02 10:17 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 10:31
Paul Riley2-Oct-02 10:31 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 11:23
leppie2-Oct-02 11:23 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 11:55
Paul Riley2-Oct-02 11:55 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 12:08
leppie2-Oct-02 12:08 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 12:07
Paul Riley2-Oct-02 12:07 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 12:29
leppie2-Oct-02 12:29 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 12:35
Paul Riley2-Oct-02 12:35 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
leppie2-Oct-02 12:59
leppie2-Oct-02 12:59 
GeneralRe: CheckBoxList (ListItem.Selected) Pin
Paul Riley2-Oct-02 13:09
Paul Riley2-Oct-02 13:09 
GeneralIDE for ASP Pin
Sarvesvara (BVKS) Dasa2-Oct-02 0:57
Sarvesvara (BVKS) Dasa2-Oct-02 0:57 
GeneralRe: IDE for ASP Pin
Megan Forbes2-Oct-02 1:02
Megan Forbes2-Oct-02 1:02 
GeneralRe: IDE for ASP Pin
raajsekhar3-Oct-02 2:11
raajsekhar3-Oct-02 2:11 
GeneralRe: IDE for ASP Pin
goddess_spanky3-Oct-02 9:22
goddess_spanky3-Oct-02 9:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.