Click here to Skip to main content
15,921,884 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: QueryString Encryption Pin
Christian Graus25-Feb-08 21:30
protectorChristian Graus25-Feb-08 21:30 
QuestionAjax Control Pin
~V~25-Feb-08 20:43
~V~25-Feb-08 20:43 
GeneralRe: Ajax Control Pin
Sam Xavier7-Mar-08 1:10
Sam Xavier7-Mar-08 1:10 
QuestionDynamic Table Row creation on button click Pin
Niya25-Feb-08 19:44
Niya25-Feb-08 19:44 
GeneralRe: Dynamic Table Row creation on button click Pin
Christian Graus25-Feb-08 20:55
protectorChristian Graus25-Feb-08 20:55 
GeneralRe: Dynamic Table Row creation on button click Pin
Niya25-Feb-08 22:32
Niya25-Feb-08 22:32 
GeneralRe: Dynamic Table Row creation on button click Pin
Christian Graus25-Feb-08 23:06
protectorChristian Graus25-Feb-08 23:06 
GeneralRe: Dynamic Table Row creation on button click Pin
Niya25-Feb-08 23:45
Niya25-Feb-08 23:45 
I have no need to bind data from database.
The purpose is to insert enter details.

i have this code on button click

protected void btnAddNewLine_Click(object sender, EventArgs e)
{
count = count + 1;
addNewline();
btnRemove.Visible = true;

}

public void addNewline()
{

HtmlTableRow tr1= new HtmlTableRow();
tr1.ID = "tr1" + count;
HtmlTableCell tc1 = new HtmlTableCell();
for (int i = 0; i <9 ; i++)
{
tc1 = new HtmlTableCell();
if (i == 0)
{
tc1.Height = "21";
tc1.Width = "4";
DropDownList ddlItem = new DropDownList();
ddlItem.Width = System.Web.UI.WebControls.Unit.Pixel(109);
ddlItem.Items.Add("--Select--");
tc1.Controls.Add(ddlItem);
tr1.Cells.Add(tc1);
}
if (i == 1)
{

tc1.Height = "21";
tc1.Width = "3";
tr1.Cells.Add(tc1);
}
if (i == 2)
{
TextBox txtDescription = new TextBox();
txtDescription.Width = System.Web.UI.WebControls.Unit.Pixel(150);
txtDescription.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtDescription);

tr1.Cells.Add(tc1);

}
if (i == 3)
{
TextBox txtQty = new TextBox();
txtQty.Width = System.Web.UI.WebControls.Unit.Pixel(60);
txtQty.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtQty);
tr1.Cells.Add(tc1);

}
if (i == 4)
{
TextBox txtPOPrice = new TextBox();
txtPOPrice.Width = System.Web.UI.WebControls.Unit.Pixel(70);
txtPOPrice.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtPOPrice);
tr1.Cells.Add(tc1);

}
else if (i == 5)
{
TextBox txtPartNo = new TextBox();
txtPartNo.Width = System.Web.UI.WebControls.Unit.Pixel(70);
txtPartNo.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtPartNo);
tr1.Cells.Add(tc1);

}

else if (i == 6)
{
TextBox txtRemarks = new TextBox();
txtRemarks.Width = System.Web.UI.WebControls.Unit.Pixel(136);
txtRemarks.Height = System.Web.UI.WebControls.Unit.Pixel(27);
txtRemarks.TextMode =System.Web.UI.WebControls.TextBoxMode.MultiLine;
tc1.Controls.Add(txtRemarks);
tr1.Cells.Add(tc1);

}
else if (i == 7)
{
TextBox txtORC = new TextBox();
txtORC.Width = System.Web.UI.WebControls.Unit.Pixel(67);
txtORC.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtORC);
tr1.Cells.Add(tc1);

}

else if (i == 8)
{
TextBox txtTotal = new TextBox();
txtTotal.Width = System.Web.UI.WebControls.Unit.Pixel(59);
txtTotal.Height = System.Web.UI.WebControls.Unit.Pixel(26);
tc1.Controls.Add(txtTotal);
tr1.Cells.Add(tc1);

}

}
purchaseDetails.Rows.Add(tr1);
}



but it crates only one row .
GeneralTabletPC Integration Pin
yuvachandra25-Feb-08 19:44
yuvachandra25-Feb-08 19:44 
GeneralRe: TabletPC Integration Pin
Christian Graus25-Feb-08 21:06
protectorChristian Graus25-Feb-08 21:06 
Questionhow to send emails with formatted templates, and attachments, and with plain text Pin
kprdotnet25-Feb-08 19:16
kprdotnet25-Feb-08 19:16 
GeneralRe: how to send emails with formatted templates, and attachments, and with plain text Pin
Christian Graus25-Feb-08 19:26
protectorChristian Graus25-Feb-08 19:26 
GeneralAlphabetical order sorting in Gridview Pin
Member 464849125-Feb-08 18:36
Member 464849125-Feb-08 18:36 
GeneralRe: Alphabetical order sorting in Gridview Pin
Christian Graus25-Feb-08 18:38
protectorChristian Graus25-Feb-08 18:38 
QuestionHi friends, Could you solve a loading page problem? Pin
G Nathan25-Feb-08 18:11
G Nathan25-Feb-08 18:11 
GeneralRe: Hi friends, Could you solve a loading page problem? Pin
Christian Graus25-Feb-08 18:24
protectorChristian Graus25-Feb-08 18:24 
GeneralRe: Hi friends, Could you solve a loading page problem? Pin
N a v a n e e t h25-Feb-08 18:33
N a v a n e e t h25-Feb-08 18:33 
Questionhow can i validate a date using validation control Pin
koolprasad200325-Feb-08 18:10
professionalkoolprasad200325-Feb-08 18:10 
AnswerRe: how can i validate a date using validation control Pin
Christian Graus25-Feb-08 18:25
protectorChristian Graus25-Feb-08 18:25 
AnswerRe: how can i validate a date using validation control Pin
N a v a n e e t h25-Feb-08 18:25
N a v a n e e t h25-Feb-08 18:25 
AnswerRe: how can i validate a date using validation control Pin
koolprasad200325-Feb-08 20:32
professionalkoolprasad200325-Feb-08 20:32 
GeneralRe: how can i validate a date using validation control Pin
Christian Graus25-Feb-08 20:54
protectorChristian Graus25-Feb-08 20:54 
GeneralRe: how can i validate a date using validation control Pin
koolprasad200326-Feb-08 18:38
professionalkoolprasad200326-Feb-08 18:38 
GeneralASP Membership (Change Application Name) [modified] Pin
AlexeiXX325-Feb-08 14:12
AlexeiXX325-Feb-08 14:12 
AnswerRe: ASP Membership (Change Application Name) [modified] Pin
AlexeiXX325-Feb-08 16:43
AlexeiXX325-Feb-08 16:43 

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.