Easy ? about solution explorer?

  • Thread starter Thread starter Bruce D
  • Start date Start date
B

Bruce D

Being new to .NET, prompts this question:
Why is it that when I open one of my .aspx pages (it only happens with one
of them), it always gets marked with the * to save changes...right after I
open the file?
Is there something on the page that I haven't done yet? I find it odd...any
insight is appreciated.

-bruce duncan
 
Bruce,

The best I could think of is that the designer is modifying the code
somehow (meaning, not the code designer, but the visual one for your page).
Is there anything that you are doing in the HTML or are you modifying the
machine generated code somehow?
 
Nicholas Paldino said:
Bruce,

The best I could think of is that the designer is modifying the code
somehow (meaning, not the code designer, but the visual one for your page).
Is there anything that you are doing in the HTML or are you modifying the
machine generated code somehow?
Nicholas,
I'm begining to see my problem. On the page I have a dropdownlistbox. I
created a function for when a user makes a selection change. What I did was
set the action to the new function I wrote...and VS puts some code in the
initializecomponent()...see below:

this.cbxAccountList.SelectedIndexChanged += new
System.EventHandler(this.cbxAccountList_SelectedIndexChanged);

Well...sometimes this codes "goes away". Maybe that's why it's always
needing to be saved? Anyhow, the main problem here is that the code goes
away. As I read through old Google findings...I find that I shouldn't put
any code in the InitializeComponent()...because it may "go away"....but I
didn't put that code there to begin with...the form designer did....and i
didn't modify it!

So, I guess my problem is now...how do I make the assignment for the
"selectedindexchanged" action of my dropdownlistbox? I tried putting the
code in the pageload...but that didn't seem to work. Any thoughts on where
I can make this assignment? Oh, and I see that it's also not keeping my
line for the load event either...damn... I read somewhere about puting code
after the InitializeComponent() but I don't understand where I can do that?
Don't I have to call it from the pageload or pageinit??

Any ideas?

-bruce
 
I have seen cases of controls who's designer support classes do the
serialize/deserialize poorly, and make the designer think that the text has
changed. All third-party. (Except perhaps the datagrid. I swear I was able
to repro this with a DataGrid, but I can't find the magic combination of
properties anymore. I may be insane)

--
-Philip Rieck
http://philiprieck.com/blog/

-
Nicholas Paldino said:
Bruce,

The best I could think of is that the designer is modifying the code
somehow (meaning, not the code designer, but the visual one for your
page). Is there anything that you are doing in the HTML or are you
modifying the machine generated code somehow?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Bruce D said:
Being new to .NET, prompts this question:
Why is it that when I open one of my .aspx pages (it only happens with
one
of them), it always gets marked with the * to save changes...right after
I
open the file?
Is there something on the page that I haven't done yet? I find it
odd...any
insight is appreciated.

-bruce duncan
 
Back
Top