Y
Yunus Emre ALPÖZEN [MCAD.NET]
There is no limit in programming))
Create a web control library named as MyControlLibrary and following code...
And use this control in anywhere... Feel free to built on something on
this....
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyControlLibrary
{
[System.ComponentModel.DefaultProperty("Text"),
ToolboxData("<{0}:MyLinkButton runat=server></{0}:MyLinkButton>")]
public class MyLinkButton : System.Web.UI.WebControls.LinkButton
{
string question="?";
[System.ComponentModel.Bindable(true)]
public String Question
{
get
{
return question;
}
set
{
question="";
}
}
protected override void Render(HtmlTextWriter output)
{
Attributes.Add("onClick",String.Format("javascript:return
confirm('{0}')",Question));
base.Render(output);
}
}
}
Create a web control library named as MyControlLibrary and following code...
And use this control in anywhere... Feel free to built on something on
this....
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyControlLibrary
{
[System.ComponentModel.DefaultProperty("Text"),
ToolboxData("<{0}:MyLinkButton runat=server></{0}:MyLinkButton>")]
public class MyLinkButton : System.Web.UI.WebControls.LinkButton
{
string question="?";
[System.ComponentModel.Bindable(true)]
public String Question
{
get
{
return question;
}
set
{
question="";
}
}
protected override void Render(HtmlTextWriter output)
{
Attributes.Add("onClick",String.Format("javascript:return
confirm('{0}')",Question));
base.Render(output);
}
}
}