Re: newbie question



Hi Lisa,

You're very welcome! :)

WebControls are actually server-side classes that render HTML in the page at
run-time. They also render JavaScript, but that is generally for the purpose
of handling client-side events on the server. Basically, how it works is,
the control renders both HTML and JavaScript. The JavaScript handles the
client-side event by putting a value into a hidden form field (indicating
which control fired the event) and posting the form back to itself on the
server.

The server thn rebuilds all the page classes and wires up the proper events
to them, and handles the event. It then re-renders the page back to the
client in its new configuration (as a result of the server-side processing).

This is the mechanism that Microsoft came up with for handling client-side
events in the stateless HTTP environment in which they operate.

ViewState is also used to persist the values of WebForm form fields between
PostBacks. It uses another hidden form field to store the state of each form
element between PostBacks.

You will be pleased to know that you can create your own custom Server
Controls as well. We use quite a few here at my company.

I think once you get started with VS.Net, you'll be in programmer heaven!
Other than Windows, it's Microsoft's Crown Jewel (IMHO).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Lisa Pearlson" <no@xxxxxxxx> wrote in message
news:%23mwYeW7OFHA.576@xxxxxxxxxxxxxxxxxxxxxxx
> Might nice of you to explain all this to me Kevin.
> I have to take some time to absorb this and look at concrete code samples
> to put it into perspective.
>
> One last question though.. I see lots of webcontrols, like treeview
> controls and such.
> Now, I can build controls like treeview controls and other controls using
> JavaScript and CSS.
> Are these webcontrols embedded windows controls (CWnd inherited local
> controls or ActiveX) or are they reusable JavaScript classes?
>
> Thanks,
> Lisa
>
> P.S. I'm a Visual Studio 6 user.. and like it alot. When VisualStudio.NET
> showed up, I heard quite some bad things about it.. at least from a C++
> programmer's perspective, not using .NET, sticking to VS6 seemed better..
> worked nicer with class wizard and such. I'm willing to use
> VisualStudio.NET, but that'll take some time getting used to also.
>
> "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:e0Ifl92OFHA.2468@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi Lisa,
>>
>> I'll be glad to answer your questions.
>>
>>> IIS is installed. I wish to use ASP.NET with C#.
>>> Now do I need Visual Studio .NET, or does notepad suffice?
>>
>> ASP.Net is compiled, not scripted. However, you do have the option to use
>> code files rather than DLLs if you want, which are compiled at run-time.
>> and you can certainly write them in NotePad, if you have the time! The
>> .Net platform comes with all the command-line tools you need to do
>> compiling without Visual Studio, if that is your preference. However, I
>> recommend using Visual Studio, as it is the best darned programming IDE
>> ever built, period.
>>
>>> What does Visual Studio.NET provide other than debugging and text
>>> coloring.. is it just like FrontPage is for HTML/ASP or does .NET code
>>> have to be compiled? If so, what is it compiled into? Portable
>>> Executable (PE)? What the hell is that? Intermediate code?
>>
>> Visual Studio.Net provides you with all the latest debugging and
>> compiling tools, intellisense, auto-complete, a whole plethora of other
>> functionality, and is eminently extensible using VB.Net to extend it. It
>> can be literally anything you need it to be, in terms of debugging. It
>> can create ASP.Net applications, as well as any other type of application
>> you may want to build using .Net technology.
>>
>> Managed code is ordinarily compiled into byte code similar to Java - MSIL
>> (Microsoft internediate language). This internediate language also has
>> the same drawback as Java, in that you can read it fairly easy (Visual
>> Studio.Net comes with a tool called IldAsm for viewing the byte code). It
>> also comes with an obfuscator, which can obfuscate the MSIL in the file.
>> Or, you can compile all the way to native machine language if you desire.
>>
>>> What does an ASP.NET website consist of? .aspx files, that are like asp
>>> files, mix of HTML and C# (or whatever scripting is used).. and .dll's
>>> that work like CGI or IIS extensions?
>>
>> Again, here you have some flexibility (MIcrosoft likes to accomodate as
>> many personality types as possible in their software). Visual Studio.Net
>> uses compiled DLLs with ASPX page templates. You can also use ASPX
>> templates with CodeBehind files (uncompiled), or simply ASPX files with
>> embedded code in them.
>>
>> Now, as you're an experienced programmer, I'm going to go a bit more
>> deeply into the details of the ASP.Net programming model. If you remember
>> what I said yesterday, the .Net Framework has classes of all sorts,
>> ranging from high-level components that almost work right out of the box,
>> to low-level unmanaged code and pointers. Because the .Net platform is
>> OOP, Microsoft has done an amazing job of creating a class hierarchy that
>> enables you to move from one "level" to another easily.
>>
>> With regards to ASP.Net, Microsoft has created a whole slew of classes in
>> a very well-organized hierarchy, that goes all the way from drag-n-drop
>> WebControls (UI elements that render HTML), to the Page class, down to
>> the HttpHandler level. In essence, the IHttpHandler interface is the key.
>> When IIS receives a Request, it passes it off the the HttpHandler for
>> that type of file, which is configured in IIS. The ASP.Net
>> System.Web.UI.Page class is an Httphandler, which is installed by default
>> as the HttpHandler for ASPX pages. It implements IHttpHandler. An ASPX
>> page is a class. The Page Template inherits the System.Web.UI.Page class.
>> In the CodeBehind model, which separates the business logic from the
>> presentation layer, the CodeBehind class inherits System.Web.UI.Page, and
>> the Page Template inherits the CodeBehind class.
>>
>> However, this doesn't limit you to using the Microsoft System.Web.UI.Page
>> programming model. In fact, you can create your own custom HttpHandlers,
>> and assign them to handle requests for certain file extensions. In
>> essence, the system.Web.UI.Page programming model is a pre-built, robust
>> set of classes which allows the developer to concentrate on functionality
>> rather than re-inventing an HttpHandler with every page. It is
>> event-driven, with client-side events causing PostBacks (an ASPX page
>> psts back to itself to handle events). When the PostBack occurs, the
>> server-side classes are rebuilt, the event is re-wired to the handler,
>> and the appropriate server-side handler is invoked to respond to the
>> client-side event. this usually consists of performing some business
>> logic, and adjusting the look of the page when it returns to the client.
>>
>> There's a lot more, but that's the essence of the matter.
>>
>> Now, don't let the sheer size of the CLR bother you. Download the free
>> .Net SDK, which is an awesome and searchable reference. You will never
>> use half of the classes in there, so you don't need to know what they all
>> are. There are classes in there to perform virtually any type of action
>> on a computer or Network. But most of the time you'll be working with a
>> small sub-set of the CLR, a couple hundred classes, and you can look up
>> others as needed.
>>
>> Any other questions? :)
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> .Net Developer
>> What You Seek Is What You Get.
>>
>>
>> "Lisa Pearlson" <no@xxxxxxxx> wrote in message
>> news:ef%23GfDvOFHA.2728@xxxxxxxxxxxxxxxxxxxxxxx
>>>> You'll feel much better once you get into it. :)
>>>
>>> I doubt it, but I got nothing to lose except my sanity.
>>> *slowly takes the gun off her forehead*
>>>
>>> So, what do I need to get started?
>>>
>>> IIS is installed. I wish to use ASP.NET with C#.
>>> Now do I need Visual Studio .NET, or does notepad suffice?
>>> What does Visual Studio.NET provide other than debugging and text
>>> coloring.. is it just like FrontPage is for HTML/ASP or does .NET code
>>> have to be compiled? If so, what is it compiled into? Portable
>>> Executable (PE)? What the hell is that? Intermediate code? What does an
>>> ASP.NET website consist of? .aspx files, that are like asp files, mix of
>>> HTML and C# (or whatever scripting is used).. and .dll's that work like
>>> CGI or IIS extensions?
>>>
>>> It took me years to figure out what was such a big deal about XML, for
>>> them to write huge books about XML as the next big thing.. "Isn't it
>>> just storing data hierarchically in a format similar to HTML?" I
>>> wondered.. so what else is there to say about it? I guess I should've
>>> picked up one of those big books to find out. I use XML all the time,
>>> but till this day I still don't know what the big deal was. It seems
>>> we're not buying technology so much as we are buying marketing
>>> terminology.. I have to look up the meaning of it all.. I just looked up
>>> what "Assemblies" were.. the discriptions are so abstract, that it
>>> doesn't help you have a concrete idea unless you get to see actual
>>> code.. I don't even speak the world of .NET terminology yet, let alone
>>> program with it.
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Performance question
    ... Keep in mind that all the menu controls, server generated or client ... will depend on the client allowing javascript. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: hosting a c# custom control in webbrowser
    ... small isolated network with no options to connect to any server of any ... I dont have the option to not use javascript, ... any server of any kind to download the controls. ... So im wondering if there isnt a way to load the controls directly from ...
    (microsoft.public.dotnet.languages.csharp)
  • Problems with disabling ASP.NET controls using javascript
    ... javascript so the user can't do anything with any of the controls on ... using javascript, it gets grayed out, but the user can still use it. ... on the server side by setting the control's Enabled property to false, ... there is no href in the tag. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Advice regarding best use of HTML / Web Controls in UserControl
    ... then should the links be ASP.NET server controls or should I do HTML ... server side controls then I have to emit the JavaScript code when the page ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • the most efficient way get an answer for each of them would be to:
    ... Access or SQL Server database. ... > 6) WHAT ARE THE TYPES OF ASSEMBLIES? ... > 21) DIFFERNCE BETWEEN asp.net SERVER CONTROLS AND HTML ... > namespace used for this?. ...
    (microsoft.public.cert.exam.mcsd)