Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-20-2012, 03:47 PM   PM User | #1
vorl
Regular Coder

 
Join Date: Feb 2005
Posts: 190
Thanks: 25
Thanked 0 Times in 0 Posts
vorl is an unknown quantity at this point
ASPX MSSQL Query

Hi there
I am a total newbee when it comes to ASP.NET. Ive only ever worked in PHP so I am completely baffled when I am looking at the code!
I need to debug it so I need to understand it...

I have attached the page code...

I dont understand how the data on the page is pulled from the MSSQL database and is inserted in the page.
If someone could explain to me how or point me in the right direction, I would be very grateful!

Thanks!
Attached Files
File Type: txt aspx.txt (1.7 KB, 72 views)
vorl is offline   Reply With Quote
Old 02-20-2012, 10:34 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
ASP.NET does most of its work in "code behind" files.

If the page you showed there has a name of, EXAMPLE ONLY, "mypage.aspx" then most of the coding will be in a file named either "mypage.aspx.cs" or "mypage.aspx.vb".

There might well be several other pages "code behind" in support of that front page. For example (but not limited to), "mypage.aspx.designer.cs".

The "placeholder" that you see there is just that: It will be replaced by contents generated in the other code.

It would not be unusual to need to view 5 to 10 different files of code to understand how a single asp.net ".aspx" page is working. More common will be just the one or two added files.

I really think you are tackling this from the wrong end. You probably should learn to build a couple of ASP.NET pages first, just so you see how it all fits together, before you try to debug and existing page.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
vorl (02-22-2012)
Old 02-20-2012, 10:59 PM   PM User | #3
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
To add on to what OldPedant said, an aspx page can call any number of C#/VB classes that may not be seen in the aspx.cs/aspx.vb file
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE
alykins is offline   Reply With Quote
Users who have thanked alykins for this post:
vorl (02-22-2012)
Old 02-21-2012, 12:42 AM   PM User | #4
vorl
Regular Coder

 
Join Date: Feb 2005
Posts: 190
Thanks: 25
Thanked 0 Times in 0 Posts
vorl is an unknown quantity at this point
Quote:
Originally Posted by Old Pedant View Post
ASP.NET does most of its work in "code behind" files.

If the page you showed there has a name of, EXAMPLE ONLY, "mypage.aspx" then most of the coding will be in a file named either "mypage.aspx.cs" or "mypage.aspx.vb".

There might well be several other pages "code behind" in support of that front page. For example (but not limited to), "mypage.aspx.designer.cs".

The "placeholder" that you see there is just that: It will be replaced by contents generated in the other code.

It would not be unusual to need to view 5 to 10 different files of code to understand how a single asp.net ".aspx" page is working. More common will be just the one or two added files.

I really think you are tackling this from the wrong end. You probably should learn to build a couple of ASP.NET pages first, just so you see how it all fits together, before you try to debug and existing page.
Thanks Old Pedant for the advise! Would you happen to have any recommendations for learning?

Thanks again!
vorl is offline   Reply With Quote
Old 02-21-2012, 01:04 AM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,237
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Best way to start:

Download the free "Web Developer Express" from http://msdn.microsoft.com/express

Then from that same site, choose some of the many tutorials as appropriate to what you want to learn. After working through those basic ones, also look on http://www.asp.net for the tutorials there.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
vorl (02-22-2012)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:25 PM.


Advertisement
Log in to turn off these ads.