473,324 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Code Behind

126 100+
Hi Good Guys,
Please help me. I need your help.

In my office I am the only Web Developer. There are no other Web Developer.

I was confused by my co-worker programmers regarding the meaning of Code Behind. They told me there is no such Code Behind.

Please highlight which is CodeBehind from these 2 sets of sample coding:

these are from HTML
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>Untitled Page</title>
  6.     <asp:ContentPlaceHolder ID="head" runat="server">
  7.     </asp:ContentPlaceHolder>
  8.     <link href="MainStyleSheet.css" rel="stylesheet" type="text/css" />
  9. </head>
  10.  
-------------------------
There are from ASP.NET Form
Expand|Select|Wrap|Line Numbers
  1. Option Explicit On
  2. Imports System.Web
  3. Imports System.Web.UI
  4. Imports System.Web.UI.WebControls
  5.  
  6. Partial Public Class MasterPage
  7.     Inherits System.Web.UI.MasterPage
  8.  
  9.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  10.  
  11.         If Request.IsAuthenticated = False Then
  12.             lblWelcome.visible = False
  13.         Else
  14.             lblWelcome.visible = True
  15.         End If
  16.     End Sub
  17.  
  18. End Class

Of the 2 sets of sample cpding which one is called CodeBehind ?
Aug 11 '10 #1

✓ answered by MrMancunian

Hi Lennie,

the second one is called the Code Behind. It is usually saved in a separate file with a .vb extension. So if the first codepart is called Default.aspx then the second part is called Default.aspx.vb.

In Visual Studio, you can separate these pages in the Solution Explorer (see attachment). Check the second icon (called Show All Files).

Steven

2 1103
MrMancunian
569 Expert 512MB
Hi Lennie,

the second one is called the Code Behind. It is usually saved in a separate file with a .vb extension. So if the first codepart is called Default.aspx then the second part is called Default.aspx.vb.

In Visual Studio, you can separate these pages in the Solution Explorer (see attachment). Check the second icon (called Show All Files).

Steven
Attached Images
File Type: png solex.png (3.4 KB, 85 views)
Aug 12 '10 #2
lenniekuah
126 100+
Hi MrMancunian,
Thank you very much for the information. You are very awesome and generous in sharing information. Appreciate your help very much.
Aug 12 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Richard Dixson | last post by:
I created a new C# web application. Basically all I am trying to do is create a table that consists of a few rows with two columns in each. And then to set those columns to text values from my...
2
by: Ric | last post by:
im new to asp.net. from what i understand, you have the aspx file (presentation), user-control(ascx file), code-behind(vb file) and components(compiled vb and dll files). the aspx file contains a...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
1
by: Me | last post by:
Hi, I inherited a web application that has several very similar forms for gathering user data. User's must choose the form that best fits their needs and fill it out. Each form has about 15...
7
by: Alan Silver | last post by:
Hello, I am just looking at VWD and seeing what needs doing to take an existing site I've written by hand and importing it into VWD. I've already discovered that I need to rename my code-behind...
7
by: Alan Silver | last post by:
Hello, I have installed the 2.0 framework, and am looking at converting some of my 1.1 pages to use partial classes. I don't (yet) have VS2005, so I'm doing this by hand, but am having problems....
2
by: walter | last post by:
Hi, when I add a new page in my asp.net 2 project and put some controls there, everything works fine until I move the code behind into App_Code folder.--When I compile , it tells me that control...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.