Wednesday, March 28, 2012

Where does form load appear from? (The tutorial video stops working at this precise point!

How infuriating - I've was followin the Asp.Net tutorial vid on secuirty - and it got to a point where the screen stops moving but the voice keeps talking for about a minute.

In that time the statementprotected void form1_Load(object sender ... ) etc appeares on the screen but I can't seem to figure out how the guy obtained it.

I would imagine it would be obtained by going to Source view, selecting form1 from the drop down list at the top of the code, and then selecting OnLoad or Load from the events list.

However I cannot see any such events in the events list for form1.

Any ideas?

Have solved my own problem it I think.

But first let me correct my spelling in the first line of my question (so that it hepls others doing a search for the same thing). It shoud read:

"How infuriating - I've was following the Asp.Net tutorial video on security - and it got to a point where the screen stopped moving but the voice kept talking for about a minute."

Anyway the answer which I got from here:http://forums.asp.net/thread/1197983.aspx

seems to be when you create the new page which "place code in a separate file" ticked.

In this case it might be you have to settle for using Page_Load instead of Form_Load. I thought placing code in a separate file was good practicse, but now I'm not sure.

0 comments:

Post a Comment