Click here to Skip to main content
16,011,120 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to read a value in a memory address using c#! Pin
Daniel Grunwald22-Jan-09 20:50
Daniel Grunwald22-Jan-09 20:50 
GeneralRe: How to read a value in a memory address using c#! Pin
Jon Rista23-Jan-09 4:38
Jon Rista23-Jan-09 4:38 
AnswerRe: How to read a value in a memory address using c#! Pin
Ennis Ray Lynch, Jr.22-Jan-09 10:36
Ennis Ray Lynch, Jr.22-Jan-09 10:36 
GeneralRe: How to read a value in a memory address using c#! Pin
PIEBALDconsult22-Jan-09 18:55
mvePIEBALDconsult22-Jan-09 18:55 
GeneralRe: How to read a value in a memory address using c#! Pin
Guffa22-Jan-09 20:07
Guffa22-Jan-09 20:07 
Questiondynamic drag and drop window component Pin
anishkannan22-Jan-09 6:56
anishkannan22-Jan-09 6:56 
AnswerRe: dynamic drag and drop window component Pin
Rutvik Dave22-Jan-09 8:19
professionalRutvik Dave22-Jan-09 8:19 
QuestionCreate textbox using array & insert the text box values into sqlserver database using c# Pin
ramya_jkumar22-Jan-09 6:53
ramya_jkumar22-Jan-09 6:53 
Hi i have created dynamically 2 text boxes in a row using a loop based on the user selection from dropdownlist box .i.e if user selects 2 in dropdownlistbox then there will be 2 rows of that text boxes will be generated dynamically...

My problem is i want to read the 2 text box values in a row and insert the values in to the database (sqlserver 2005) table,in the same way for all the geneated rows ??? can some body help me in solving my problem..

i dont knw how to read the values and inset into the table..pls pls some body give some idea or steps to follow...waiting for the answer eagerly.. i'm attaching the code fro reference:

protected void Page_Load(object sender, EventArgs e)
{
int i=0;
if (!Page.IsPostBack)
for (i = 0; i < 1000; i++)
{
DropDownList1.Items.Add(i.ToString());
}


if (Page.IsPostBack)
{
this.Rows = DropDownList1.SelectedIndex;
}

CreateDynamicTable();
}
protected int Rows
{
get
{
return ViewState["Rows"] != null ? (int)ViewState["Rows"] : 0;
}
set
{
ViewState["Rows"] = value;
}
}
protected int Columns
{
get
{
return ViewState["Columns"] != null ? (int)ViewState["Columns"] : 0;
}
set
{
ViewState["Columns"] = value;
}
}



private void CreateDynamicTable()
{
PlaceHolder1.Controls.Clear();

int tblRows = Rows;
int tblCols = Columns;
Table tbl = new Table();
PlaceHolder1.Controls.Add(tbl);
for (int i = 0; i < tblRows; i++)
{
TableRow tr = new TableRow();
for (int j = 0; j < 4; j++)
{
if (j % 2 == 0)
{
TableCell tc = new TableCell();
Label label1 = new Label();
label1.Text = "RowNo:" + i + " " + "ColumnNo:" + " " + j;
tc.Controls.Add(label1);
tr.Cells.Add(tc);

}
else
{
TableCell tc = new TableCell();
TextBox txtBox = new TextBox();
tc.Controls.Add(txtBox);
tr.Cells.Add(tc);
}

}
tbl.Rows.Add(tr);
}

ViewState["dynamictable"] = true;
}

protected override void LoadViewState(object earlierState)
{
base.LoadViewState(earlierState);
if (ViewState["dynamictable"] == null)
CreateDynamicTable();
}



Ramya
AnswerRe: Create textbox using array & insert the text box values into sqlserver database using c# Pin
Wendelius22-Jan-09 8:08
mentorWendelius22-Jan-09 8:08 
Questioncalculating slope of a line Pin
steini144122-Jan-09 6:29
steini144122-Jan-09 6:29 
AnswerRe: calculating slope of a line Pin
DaveyM6922-Jan-09 6:42
professionalDaveyM6922-Jan-09 6:42 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 8:38
mvePIEBALDconsult22-Jan-09 8:38 
AnswerRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 6:51
mvePIEBALDconsult22-Jan-09 6:51 
GeneralRe: calculating slope of a line Pin
steini144122-Jan-09 7:10
steini144122-Jan-09 7:10 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 7:12
mvePIEBALDconsult22-Jan-09 7:12 
AnswerRe: calculating slope of a line Pin
Ennis Ray Lynch, Jr.22-Jan-09 7:04
Ennis Ray Lynch, Jr.22-Jan-09 7:04 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 7:14
mvePIEBALDconsult22-Jan-09 7:14 
GeneralRe: calculating slope of a line Pin
steini144122-Jan-09 7:46
steini144122-Jan-09 7:46 
GeneralRe: calculating slope of a line Pin
Ennis Ray Lynch, Jr.22-Jan-09 7:49
Ennis Ray Lynch, Jr.22-Jan-09 7:49 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 7:53
mvePIEBALDconsult22-Jan-09 7:53 
GeneralRe: calculating slope of a line Pin
steini144122-Jan-09 8:01
steini144122-Jan-09 8:01 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 8:07
mvePIEBALDconsult22-Jan-09 8:07 
GeneralRe: calculating slope of a line Pin
steini144122-Jan-09 8:39
steini144122-Jan-09 8:39 
GeneralRe: calculating slope of a line Pin
PIEBALDconsult22-Jan-09 8:41
mvePIEBALDconsult22-Jan-09 8:41 
GeneralRe: calculating slope of a line Pin
steini144122-Jan-09 8:47
steini144122-Jan-09 8:47 

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.