Saturday, November 21, 2009

Day 2

Lets learn the first page:
(1)<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

Its the first line:
 Page language="C#"
whole internal coding will be in c# language
 AutoEventWireup="true"
  If you do set AutoEventWireup to true , Visual Studio will
    generate code to bind the events and the                 
age framework will automatically call events based on their names.
This can result in the same event code being called twice when the  
 page runs. As a consequence, you should always leave AutoEvent
 Wireup set to false when working in Visual Studio.May be it is   
 hard to understand..u just remember if you are new at ASP.NET
 leave it true
CodeFile="Default.aspx.cs"
do one thing, select design in three
 lower tabes and click on given div tag,it will open such type of                
  page





This is The code file for any asp.net page,If name of page is "Adarsh.aspx"
then
Name of code file will be "adarsh.aspx.cs"
Inherits="_Default"
basically it is saying that there are two objects called _Default and
you are wanting to use one of them but it does not know which one to
instantiate.and finally leave it if you are new any action on first line
can ruin your website ,so wait to work on first line.

If you are getting any parsing error than remove this and your problem will be
solved.Like this
Parser Error Message: The type '_Default' is ambiguous:.



If you want to convert any of the form fields within an HTML form into
ASP.NET controls, you must use the Runat="Server" attribute with the
opening form tag.


To convert any html Page into  ASP.NET PAGE

  1. You rename the file so that the filename ends with the extension
    .aspx.


  2. You add the attribute Runat="Server" to each of the form tags.


  3. Instead of using the NAME attribute for the form tags, you use ID
    instead.


  4. You convert the opening
    tag from
    action="SimpleASPX.aspx"> to the simpler
    .




Tomorrow we will discuss on benifits of ASP.NET,and go for some harder sections.




I am not well today,so I discussed very small section,we will increase our speed later
                                                                                                                                 

No comments:

Post a Comment