Developers Archive for the 'dot net c# development' Category

oops concepts overloading(C#)

oops concepts overloading(C#) Tuesday, March 11th, 2008

Definition:Same member different arguments.

public class over
{
public over()
{
}
public void getvalue(int id, int id1)
{
HttpContext.Current.Response.Write(id);
HttpContext.Current.Response.Write(id1);
}
public void getvalue(string id, string empname)
{
HttpContext.Current.Response.Write(id);
HttpContext.Current.Response.Write(empname);
}
}

out put

over getvalue1 = new over();
getvalue1.getvalue(”Pgmr”, “Pgmr1″); //This is for string
getvalue1.getvalue(1,2); //This is for integer

HTML enhancements in ASP.Net 2.0

HTML enhancements in ASP.Net 2.0 Tuesday, March 11th, 2008

HTML enhancements in ASP.Net 2.0

Accessing tag:

The link tag is useful to register a CSS file with our Webpage. It can be accessed in codebehind or can be added through codebehind by the following code.

HtmlLink cssLink = new HtmlLink();
cssLink.Href = “StyleSheet.css”;
cssLink.Attributes.Add(”rel”, “stylesheet”);
cssLink.Attributes.Add(”type”, “text/css”);
Page.Header.Controls.Add(cssLink);

This will inject a

This class is new in 2.0 while this also can be achieved thro HtmlInputButton class in 1.x.

Overview of Delegates(C#)

Overview of Delegates(C#) Monday, March 10th, 2008

Definetion:Delegate is nothing but the pointing the function.

How to call method using Delegate:

delegate void getvalue(); //Above class you have to declare delegate
public partial class Global : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
getvalue test=new getvalue(testpgmr);
test();
}
protected void testpgmr()
{
Response.Write(”pgmr”);
}

Output

pgmr


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.