3 Replies - 639 Views - Last Post: 05 September 2009 - 02:38 PM Rate Topic: -----

#1 kdubbie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 05-September 09

help with better understanding of .Net language interaction

Posted 05 September 2009 - 10:49 AM

Hello,

Just want to thank everyone for reading my post. And apologize up front if it's in the wrong section or I have missed another post relating to my question.

I am a graphic designer for print media, with a little web design added in. I Create banner ads, update CSS for my company's web sites and create a few random pages, but our company also employs a web developer. I have worked with him once or twice and I am finding that I am really interested in learning more. I have done a lot or research online about .net and programming web applications, and I think I have identified a path I can follow so that maybe one day I can move over to the IT department, which uses SQL server for database and Visual Studio to program our web apps....

However after everything I have read, I still feel like I'm missing some crucial background information and I don't want to start tutorial books/websites before I get a better understanding of what can be accomplished with .Net programming languages and how those languages interact with each other to create what they do.

Some questions that have arised in my reading are
Is an aspx file the server side version of an HTML file?
How does it use C# or VB files, do you attach them separetely in the header like you would a Javascript or CSS file?
What part of a website is being displayed or made functional because of Javascript and what part is being made functional because .net programming?

Now I understand there are countless ways of programming a page under the .net framwork and that there is no one correct answer to the questions I asked, but if

someone could possibly use an example site, or just how they go about doing it. (I.e. On site www.somesite.com, once the user clicks this button, Javascript validates the form and _____ language does this to display that.....SQL server houses the information and because of ____ language, it can be displayed...etc)

Once more, I am not looking for a step by step "how-to" tutorial, but more just an explanation or summary of how aspx files and .net languages interact with each other to display information. Again, feel free to use specific examples if it's too broad of a question.

Thank you very much and I really appreciate any insight and sorry for the long post.
kdubbie

Is This A Good Question/Topic? 0
  • +

Replies To: help with better understanding of .Net language interaction

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: help with better understanding of .Net language interaction

Posted 05 September 2009 - 11:30 AM

Unlike adding the code to the header like with Javascript and CSS, the code for an ASP.NET page is stored in the pages Code Behind file. You specify where the code behind file is in the Page Directive in the actual ASPX file (The code behind is named after the ASPX file, like for Default.aspx the code behind would be Default.aspx.cs, or .vb for VB.NET)

Depending on what your page is doing the majority of the work will more than likely be done with C# and SQL (or MySQL, Access, Oracle, etc) or it can be done with Javascript using something like AJAX or jQuery. Normally Javascript is used for things such as form validation, the vast majority of animation such as slide shows and such, and the data work and other is done by the language you're using.

ASP.NET is nothing more than a technology, and the language is normally C# and VB.NET (with some VC++). Hope this answers some of your questions :)
Was This Post Helpful? 0
  • +
  • -

#3 W3bDev  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 42
  • View blog
  • Posts: 379
  • Joined: 15-March 09

Re: help with better understanding of .Net language interaction

Posted 05 September 2009 - 12:26 PM

Hey kdubbie,

First welcome to DIC, you definatly have a reason to question why somone would use ASP.NET vs say just plain HTML, and why there's a difference. I would like to expand a little more on what Psyco mentioned and offer my 2 cents worth. All ASP.NET really is, is a communicator, or like in programming languages like C++, a compiler, that puts the code into a framework the server can understand. Even if you view a ASP.NET webpage, and the extension says aspx, or the like, you are still truly only viewing HTML.

Here's the basic principal

You -> Website request -> Server(IIS)

Server -> Obtain Request -> Get Request information -> Run it through ASP.NET Runtime -> Generates HTML for return -> Sends page back

SO when you request something, there's actually quite a bit going on at the server, which enables you to do a ton more with websites.

The nice thing about ASP.NET is there is quite a bit of Javascripting functionality actually built in, and tons of resources to extend your component library, such as the AJAX Toolkit at the ASP.NET website under AJAX. You still have full capability though, to do any javascripting you want.


The Code Behind provides a great separation between output and coding.

Implementing codebehind features, especially for buttons, etc, is very simple to do as well. Once you place an asp.net control onto your page in Visual Studio, its just a matter of configuring the properties you want it to have, then setting an action for it in the code behind. To do this, if you double click the form item, VisualStudio will automatically generate the method for the onclick action to perform, then you get straight to the action!

At the lowest level, say you have a textbox, and a submit button...

	<form id="form1" runat="server">
	<div>
	
		<asp:TextBox ID="MyText" runat="server"></asp:TextBox>
		<asp:Button ID="SubmitBtn" runat="server" Text="Button" />
	</div>
	</form>


When you double click the button in visual studio, it creates the SubmitBtn_Click event handler method:

protected void SubmitBtn_Click(object sender, EventArgs e)
	{

	}


This gives you the ability to perform an action... you can submit the value to the database, redirect to a new page with a get value, or change items on a page, or generate new items... and on and on lol.

So say we just wanted to change the text in the textbox to something new, we could do this:

protected void SubmitBtn_Click(object sender, EventArgs e)
	{
		MyText.Text = "Hello World!";
	}


This will change the text within the box to "Hello Worldt!" This is really just the starting place, but i think will give you a good idea of how easy some things are to implement verses other technologies.
Was This Post Helpful? 0
  • +
  • -

#4 kdubbie  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 05-September 09

Re: help with better understanding of .Net language interaction

Posted 05 September 2009 - 02:38 PM

Thank you very much, I really appreciate all the advice.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1