Monday 27 August 2012

Difference between tml control | server control with examples in asp.net


asp.net controls | html control | server control with examples code
1)default = the class name by default defined in System.Web.UI.Page
2)default.aspx = it is class internally and it derived from

System.Web.UI.Page


Controls in asp.net

1) asp .net supports two types control
i)Html server control
ii)Server side control
i)Html server control:-This control we use for migration purpose.
ii)These controls are defined in System.Web.UI.HtmlControls;


2)Server side controls :- These are xml based controls
i)These controls are defined in System.Web.UI.WebControls; web page
ii) web server controls can communicate web server directly.
iii)In asp .net by default your page will be submit using post method.

examples with code


using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("we are in new page");
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "asp.net event programming";


}
protected void Button2_Click(object sender, EventArgs e)
{
//Response.Redirect("default1.aspx");
Server.Transfer("default2.aspx");
}
}
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: