I want to display this text in asp.net control i.e textbox,table,etc
but it is displayed below
Hello World
I want to display like this,
Hello World
How can I figure it out?
Hello World
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 13, 2009, 5:25 AM EDT
kadir13 reputationPosted Aug 13, 2009, 5:46 AM EDT
I know your answer
But I want to display textbox or table,etc
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 13, 2009, 5:54 AM EDT
kadir13 reputationPosted Aug 13, 2009, 6:15 AM EDT
I try it but it is not
code displayed below result
< input type='text'/>< tr>< td>Hello< /td>< tr>< /table>
I try after that below code problem solved.
But result is displayed top of the page I want to display textbox or table
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=dbaseProlink;Integrated Security=True");protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
getData();
}
}
void getData()
{
SqlCommand cmd = new SqlCommand("select MTUR,VTUR,PTUR,TTUR from proAbout where AID=1", con);
con.Open();
SqlDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
Response.Write("
Response.Write("
Response.Write("
Response.Write("
Response.Write("
Response.Write("
}
rd.Close();
con.Close();
}
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 13, 2009, 9:35 AM EDT
dont execute your code from code behind execute it within mark up in code rendar block to show it at specif location
like below i have shown text box and Table
in below example Image
Note : if you don't want to Write too much code in Mark up just make function of your code and Call it from <% %> :)
Dont Forget to mark "Do you like answer" it will give me some credit if answer helped you :)
kadir13 reputationPosted Aug 14, 2009, 12:34 AM EDT
thank you for helps
you are right
I try your solving and it is running
but I don't connect database in function in aspx page.
You know my data will coming database...
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 14, 2009, 6:15 AM EDT
dont forget to mark "Do you like answer" :)
Add Namespace as below Image
Add Code like Below In Aspx
kadir13 reputationPosted Aug 14, 2009, 6:46 AM EDT
I try your code now after there is no problem..
You solved my problem ...
thank you...:)
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 14, 2009, 7:09 AM EDT