Hi I am new to Asp.Net..I am using vs 2005...Can anybody send me example code to design static and dynamic pages(like for example website design)
I'd start with some basic tutorials, and W3Schools are usually good. Take a look at http://www.w3schools.com/ASPNET/default.asp
After that, the best thing to do is experiment. Choose a small but real project (a blog engine or club membership site are common) and use that to increase your knowledge and proficiency.
The best place on earth for you is this. Lot of videos and tutorials for all levels of asp.net developers, even for those who are working on something else other than asp.net and migrating to asp.net
Link Txt: http://www.asp.net/learn/
I have five minutes to kill so.. A .NET application file (i.e. a single webpage) can be split into two different files, general convention suggests that one file is used for defining all your GUI elements (such as html) and layout of your webpage, whilst the other is used for defining the functionality.
Heres a brief example (haven't tried to run it though!!)
// *** default.aspx, GUI elements
<%@ Page Language="C#" CodeFile="default.aspx.cs" inherits="defaultClass" runat="Server" %>
<html>
<head>
<title>.NET Example in C#</title>
</head>
<!-- you can write html elements in this file -->
<body>
<form runat="server">
<asp:PlaceHolder ID="places" runat="Server"/>
</form>
</body>
</html>
// *** default.aspx.cs, functionality elements
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.Data.SqlClient;
public partial class : System.Web.UI.Page
{
protected void Page_Load(Object sender,System.EventArgs e)
{
Page.Response.Write("Hello World");
Places.Controls.Add(new LiteralControl("This text is where the placeholder is"));
}
};