Click here to Skip to main content
15,890,973 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: asp.net Pin
Kornfeld Eliyahu Peter22-Jun-14 0:31
professionalKornfeld Eliyahu Peter22-Jun-14 0:31 
GeneralRe: asp.net Pin
Priyabl22-Jun-14 0:37
Priyabl22-Jun-14 0:37 
Questiontextbox does not begin with the number Pin
Member 1032497421-Jun-14 21:06
Member 1032497421-Jun-14 21:06 
AnswerRe: textbox does not begin with the number Pin
Richard Deeming23-Jun-14 2:26
mveRichard Deeming23-Jun-14 2:26 
GeneralRe: textbox does not begin with the number Pin
Member 1032497423-Jun-14 7:24
Member 1032497423-Jun-14 7:24 
GeneralRe: textbox does not begin with the number Pin
Richard Deeming23-Jun-14 11:19
mveRichard Deeming23-Jun-14 11:19 
AnswerRe: textbox does not begin with the number Pin
Sibeesh KV29-Sep-14 1:53
professionalSibeesh KV29-Sep-14 1:53 
QuestionRe: How to get values from dynamically created controls Pin
Member 1089879721-Jun-14 19:12
Member 1089879721-Jun-14 19:12 
Hi,
I have Create Dynamic Controls on dropdown SelectedIndexChanged event

protected void ddlcount_SelectedIndexChanged(object sender, EventArgs e)
{
Table tbldynamic = new Table();
for (int i = 1; i <= count; i++)
{

tr = new TableRow();


tc1 = new TableCell();
tc2 = new TableCell();
tc3 = new TableCell();
tc4 = new TableCell();

TextBox _txtQty = new TextBox();

_txtQty.ID = "txtQtyRow" + i;
_txtQty.Width = 50;

TextBox _txtRate = new TextBox();

_txtRate.ID = "txtRateRow" + i;
_txtRate.Width = 50;

TextBox _txtAmount = new TextBox();

_txtAmount.ID = "txtAmountRow" + i;
_txtAmount.Width = 50;

CheckBox _chkRowNo = new CheckBox();
_chkRowNo.ID = "chkRowNo" + i;
_chkRowNo.Text = i.ToString();



tc1.Controls.Add(_txtQty);
tc2.Controls.Add(_txtRate);
tc3.Controls.Add(_txtAmount);
tc4.Controls.Add(_chkRowNo);

tr.Cells.Add(tc4);
tr.Cells.Add(tc1);
tr.Cells.Add(tc2);
tr.Cells.Add(tc3);

tbldynamic.Rows.Add(tr);

}
}


I need to get values from dynamically generated Textbox on Button Click Event.

I am trying below,

protected void btnSave_Click(object sender, EventArgs e)
{

CheckBox chk = (CheckBox)Page.FindControl("MainContent").FindControl("MultiviewId").FindControl("view1").FindControl("Panel1").FindControl("chkRowNo1");

}

Here

MainContent = ContentPlaceHolderID,

MultiViewId = MultiView,

ViewId = view1,

PanelId = Panel1,

chkRowNo1 = Dynamically generated checkbox
I have also tried
CheckBox chk = (CheckBox)Page.FindControl("chkRowNo1");

CheckBox chk = (CheckBox)Panel1.FindControl("chkRowNo1");

But no use. It shows an object reference error. While debugging it shows null.

Some one could you help me...
QuestionCheckboxlist combobox in Asp.net Pin
Elham M21-Jun-14 18:10
Elham M21-Jun-14 18:10 
AnswerRe: Checkboxlist combobox in Asp.net Pin
thatraja21-Jun-14 18:27
professionalthatraja21-Jun-14 18:27 
GeneralRe: Checkboxlist combobox in Asp.net Pin
Elham M28-Jun-14 21:25
Elham M28-Jun-14 21:25 
QuestionRemoving a Sub Page_Load()? Pin
Member 876166721-Jun-14 15:05
Member 876166721-Jun-14 15:05 
AnswerRe: Removing a Sub Page_Load()? Pin
jkirkerx23-Jun-14 10:39
professionaljkirkerx23-Jun-14 10:39 
AnswerRe: Removing a Sub Page_Load()? Pin
Member 876166723-Jun-14 11:16
Member 876166723-Jun-14 11:16 
GeneralRe: Removing a Sub Page_Load()? Pin
jkirkerx23-Jun-14 11:40
professionaljkirkerx23-Jun-14 11:40 
GeneralRe: Removing a Sub Page_Load()? Pin
Member 876166723-Jun-14 12:01
Member 876166723-Jun-14 12:01 
GeneralRe: Removing a Sub Page_Load()? Pin
jkirkerx23-Jun-14 13:03
professionaljkirkerx23-Jun-14 13:03 
GeneralRe: Removing a Sub Page_Load()? Pin
Member 876166723-Jun-14 14:18
Member 876166723-Jun-14 14:18 
GeneralRe: Removing a Sub Page_Load()? Pin
jkirkerx23-Jun-14 16:02
professionaljkirkerx23-Jun-14 16:02 
GeneralRe: Removing a Sub Page_Load()? Pin
Member 876166723-Jun-14 16:23
Member 876166723-Jun-14 16:23 
QuestionThe connection String property has not been initialized? Error Pin
Inayat ali jan21-Jun-14 8:45
Inayat ali jan21-Jun-14 8:45 
AnswerRe: The connection String property has not been initialized? Error Pin
Member 1089879721-Jun-14 19:47
Member 1089879721-Jun-14 19:47 
QuestionMVC Razor: Getting a user id stored in Entity Framework when calling the Controller that Display Profile View. Pin
Stephen Holdorf21-Jun-14 7:57
Stephen Holdorf21-Jun-14 7:57 
QuestionMVC Razor: Dynamically displaying and hiding UI text controls in the parent View and it's partial Views. Pin
Stephen Holdorf21-Jun-14 7:43
Stephen Holdorf21-Jun-14 7:43 
Questionmsbuild with no Visual Studio (Yes Windows SDK installed & Copy Local=true) Pin
devvvy20-Jun-14 11:26
devvvy20-Jun-14 11:26 

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.