Click here to Skip to main content
15,898,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questioncall back in asp .net 1.1 Pin
mehnazash21-Jun-06 2:28
mehnazash21-Jun-06 2:28 
AnswerRe: call back in asp .net 1.1 Pin
Dan Satria23-Jun-06 10:27
Dan Satria23-Jun-06 10:27 
Questionclient side validation Pin
DKM_DKM21-Jun-06 2:21
DKM_DKM21-Jun-06 2:21 
AnswerRe: client side validation Pin
minhpc_bk21-Jun-06 15:47
minhpc_bk21-Jun-06 15:47 
GeneralRe: client side validation Pin
DKM_DKM25-Jun-06 21:02
DKM_DKM25-Jun-06 21:02 
GeneralRe: client side validation Pin
minhpc_bk26-Jun-06 7:37
minhpc_bk26-Jun-06 7:37 
QuestionCallback in ASP .Net 1.1 Pin
mehnazash21-Jun-06 2:21
mehnazash21-Jun-06 2:21 
QuestionHow to access value from custom Web control Pin
seee sharp21-Jun-06 2:01
seee sharp21-Jun-06 2:01 
Hello All,

I have created a custom web control. This control contains three different textboxes. I place this control on web form. There is a button on web form. When I click on button, I need to access values of those textboxes. I appreciate if anyone can tell me how to access that value.

Appreciate your help.

Here is the code for Control.

public class MyControl : WebControl
{
private TextBox textbox1 = new TextBox();
private TextBox textbox2 = new TextBox();
private TextBox textbox3 = new TextBox();

[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
[Description("This returns value of textboxes as string")]
public string TextBoxChars
{
get
{
this.EnsureChildControls();
return this.textbox1.Text + "-" + this.textbox2.Text + "-" + this.textbox3.Text;
}
}


protected override void Render(HtmlTextWriter output)
{
this.EnsureChildControls();
base.Render(output);
}


protected override void CreateChildControls()
{
this.Controls.Clear();
this.Controls.Add(new LiteralControl(
"<table width='100%' height='100%' " +
"cellpadding='3' cellspacing='3'>"));

this.Controls.Add(new LiteralControl("<tr><td width='100%'>"));
this.Controls.Add(textbox1);
this.Controls.Add(new LiteralControl("</td></tr>"));

this.Controls.Add(new LiteralControl("<tr><td width='100%'>"));
this.Controls.Add(textbox2);
this.Controls.Add(new LiteralControl("</td></tr>"));

this.Controls.Add(new LiteralControl("<tr><td width='100%'>"));
this.Controls.Add(textbox3);
this.Controls.Add(new LiteralControl("</td></tr>"));

this.Controls.Add(new LiteralControl("</Table>"));
}

}


- ashish
AnswerRe: How to access value from custom Web control Pin
seee sharp21-Jun-06 3:37
seee sharp21-Jun-06 3:37 
AnswerRe: How to access value from custom Web control Pin
Dan Satria23-Jun-06 10:16
Dan Satria23-Jun-06 10:16 
QuestionApplication[cache] before app starts Pin
Malcolm Smart21-Jun-06 1:56
Malcolm Smart21-Jun-06 1:56 
AnswerRe: Application[cache] before app starts Pin
minhpc_bk21-Jun-06 15:13
minhpc_bk21-Jun-06 15:13 
QuestionQuery Problem Pin
varshavmane21-Jun-06 1:39
varshavmane21-Jun-06 1:39 
AnswerRe: Query Problem Pin
albCode21-Jun-06 1:58
albCode21-Jun-06 1:58 
GeneralRe: Query Problem Pin
varshavmane21-Jun-06 2:00
varshavmane21-Jun-06 2:00 
GeneralRe: Query Problem Pin
Malcolm Smart21-Jun-06 2:07
Malcolm Smart21-Jun-06 2:07 
GeneralRe: Query Problem Pin
varshavmane21-Jun-06 2:16
varshavmane21-Jun-06 2:16 
GeneralRe: Query Problem Pin
Malcolm Smart21-Jun-06 2:21
Malcolm Smart21-Jun-06 2:21 
GeneralRe: Query Problem Pin
albCode21-Jun-06 2:10
albCode21-Jun-06 2:10 
GeneralRe: Query Problem Pin
varshavmane21-Jun-06 2:19
varshavmane21-Jun-06 2:19 
GeneralRe: Query Problem Pin
Malcolm Smart21-Jun-06 2:27
Malcolm Smart21-Jun-06 2:27 
GeneralRe: Query Problem Pin
albCode21-Jun-06 2:28
albCode21-Jun-06 2:28 
GeneralRe: Query Problem [modified] Pin
varshavmane21-Jun-06 2:59
varshavmane21-Jun-06 2:59 
AnswerRe: Query Problem Pin
Nagraj Naik21-Jun-06 2:07
Nagraj Naik21-Jun-06 2:07 
QuestionGet variable from javascript Pin
Commickey21-Jun-06 1:34
Commickey21-Jun-06 1:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.