Re: FindControl doesn't work
- From: "MeerkatInFrance" <MeerkatInFrance@xxxxxxxxxxx>
- Date: Tue, 15 Aug 2006 15:15:18 +0200
Crumbs, this post was really helpful.
I too tried to cut corners and run before I could walk - doesn't work. :-)
Just wanted to say thanks.
Pete.
"Kevin Spencer" <uce@xxxxxxx> wrote in message
news:%23Ke1GS8vGHA.4296@xxxxxxxxxxxxxxxxxxxxxxx
Hi Dennis,
The ID attribute of the WebForm is the Name of the object.
It occurs to me that if you do not know anything about the WebForm class,
which is the meat and potatoes of the Page class, and very little about
the Page class itself, you need to stop where you are, and familiarize
yourself with these very important classes, and how they fit into the
ASP.Net object model. You will never get off of square 1 unless you do.
I'm not trying to bust your chops, but understanding ASP.Net is like
understanding Trigonometry. You have to understand arithmetic, algebra,
and geometry before you start to study Trigonometry, or you are in for a
real rough time.
ASP.Net is a pretty complex animal. It is a technology which works within
the environment of an HTTP Web Server, and that subject alone deserves
some study. It create HTML pages on the client, and understanding HTML is
also essential. I don't know at this point whether or not you are familiar
with HTML, but it should be mentioned. It uses a combination of
server-side Object-Oriented programming, and client-side HTML, XML, CSS,
JavaScript, the whole nine yards of what can be done with HTML. All of
these topics you should be familiar with.
In addition, ASP.Net has its own development model, centered around the
base class System.Web.UI.Control. A Page class is inherited from Control,
as is the WebForm class. In fact, any class in an ASP.Net page that sends
HTML to the client inherits System.Web.UI.Control. So, it is important to
understand how Controls work.
Because HTTP is stateless, ASP.Net incorporates a set of "tricks" that
emulate state between Page requests. You need to understand these as well,
including what ViewState, PostBack, Session, and Application are, at the
very least.
The ASP.net System.Web.UI.Page class is the central object usually, as it
incorporates all of the process involved in composing and rendering the
HTML, as well as process for handling PostBacks and server-side Events.
The Page class hosts the WebForm as well as all other
System.Web.UI.Controls in the Page. The Page class is a special type of
class that is called a "Templated Control." It may contain both
programming code and ASP.Net/HTML markup. In fact, it is compiled at
run-time to a class, and the markup becomes executable code. The markup is
a handy mixture of the familiar HTML markup syntax, and a similar ASP.Net
markup syntax which can be used to create Controls in the Page.
The WebForm is the heart of the PostBack model, and must contain all of
the Controls which require any action on the server. you should be
familiar with how the WebForm Control works as well.
Here is the complete Visual Web Developer Reference:
http://msdn2.microsoft.com/en-us/library/ms178093.aspx
Here is the Reference Section regarding ASP.Net Pages:
http://msdn2.microsoft.com/en-us/library/2z18a5tf.aspx
Here is the .Net SDK ASP.Net Reference:
http://msdn2.microsoft.com/en-us/library/9k6k3k4a.aspx
Here is the .Net SDK System.Web.UI Namespace Reference:
http://msdn2.microsoft.com/en-us/library/system.web.ui.aspx
So, do yourself a *big* favor, and try to get a working grasp of these
mechanisms before you try to go forward.
--
HTH,
Kevin Spencer
Microsoft MVP
Chicken Salad Surgery
Orange you bland I stopped splaying bananas?
"Dennis" <dbronstein@xxxxxxxxx> wrote in message
news:1155565213.512591.140030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Kevin Spencer wrote:
Did you try Form1.FindControl? Is the Control immediately underneath the
Form?
I don't have a Form1, or if I do, I don't know how to reference it. I
have a Page.Form and Me.Form, but as I said, neither of those work.
.
- References:
- FindControl doesn't work
- From: Dennis
- Re: FindControl doesn't work
- From: Kevin Spencer
- Re: FindControl doesn't work
- From: Dennis
- Re: FindControl doesn't work
- From: Kevin Spencer
- Re: FindControl doesn't work
- From: Dennis
- Re: FindControl doesn't work
- From: Kevin Spencer
- Re: FindControl doesn't work
- From: Dennis
- Re: FindControl doesn't work
- From: Kevin Spencer
- Re: FindControl doesn't work
- From: Dennis
- Re: FindControl doesn't work
- From: Kevin Spencer
- FindControl doesn't work
- Prev by Date: Re: Search engine optimisation of asp.net.20 pages.
- Next by Date: Re: How to display a picture while a long process is carried out ?
- Previous by thread: Re: FindControl doesn't work
- Next by thread: Re: FindControl doesn't work
- Index(es):
Relevant Pages
|
Loading