Access asp control from c#
-
Hi... I have two DIV controls in my main.aspx page. 1st DIV's ID is COMPONENT and another one is COLOR. in main.aspx.cs, I have code to retrieve some datas from database.
foreach (DataRow drRow in dtResult.Rows)
{Loginname = drRow\["name"\].ToString(); password = drRow\["password"\].ToString(); Response.Write(Loginname + "-" + password); }
It is printing the values in mian window.but i want to print the value of Loginname & password into the DIV - COMPONENT. How to do this... Any help will be appriciated... Thanks...
G.Paulraj
-
Hi... I have two DIV controls in my main.aspx page. 1st DIV's ID is COMPONENT and another one is COLOR. in main.aspx.cs, I have code to retrieve some datas from database.
foreach (DataRow drRow in dtResult.Rows)
{Loginname = drRow\["name"\].ToString(); password = drRow\["password"\].ToString(); Response.Write(Loginname + "-" + password); }
It is printing the values in mian window.but i want to print the value of Loginname & password into the DIV - COMPONENT. How to do this... Any help will be appriciated... Thanks...
G.Paulraj
use labels in that div and write it there
-
use labels in that div and write it there
-
yes... That is one method. But here i don't know how much rows are there. So i have to include many labels... thats why i am asking to print with out labels...
G.Paulraj
or use a multiline textbox and write like TextBox1.Text+= Loginname + "-" + password + "\r\n" ;
-
or use a multiline textbox and write like TextBox1.Text+= Loginname + "-" + password + "\r\n" ;
Yes... Its working.... But i need to give links to each login name. for ex, paul - www.paul.com raj - www.raj.com rakesh - www.rakesh.com Thats why i am asking to print in DIV. Thanks...
G.Paulraj
-
Yes... Its working.... But i need to give links to each login name. for ex, paul - www.paul.com raj - www.raj.com rakesh - www.rakesh.com Thats why i am asking to print in DIV. Thanks...
G.Paulraj
foreach (DataRow drRow in dtResult.Rows) { Loginname = drRow["name"].ToString(); password = drRow["password"].ToString(); disp.InnerHtml += Loginname + "-" + password; disp.InnerHtml+=("
"); }