Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 24th, 2008, 04:45 AM
Registered User
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default writing text on page

how can i create dynamic para<p> and write text on it retrieving from database...
is there any function ?

another question:

is there any function to clear text from Textbox ?
 
Old December 24th, 2008, 12:25 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

These are both extremely basic questions.

To clear a textbox you simply do something like this:

csharp Code:
textBox1.Text = String.Empty;

As far as "creating a dynamic paragraph tag" I would either use a Label or a Literal:

csharp Code:
literal1.Text = "<p>" + datareader["columnname"] + "</p>";
//or
label1.Text = "<p>" + datareader["columnname"] + "</p>";

Where datareader is a DataReader object that contains the information you want to display to the user. You could, of course, use any object in place of the datareader such as a DataTable or DataSet.

In the future try using google for your answer. A simple google query for: ASP.NET - Displaying Data from a database returns copuious amounts or results:

http://www.google.com/search?source=...le+Search&aq=0

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem writing in text box in ASP naureen tahir Dreamweaver (all versions) 0 May 22nd, 2007 09:45 AM
Creating, Writing to and Deleting Text Files goels Access VBA 7 January 30th, 2007 11:51 AM
Writing to Text File striker9 ASP.NET 2.0 Basics 1 May 12th, 2006 05:17 AM
writing text file but in an order specifed... stone XSLT 2 October 27th, 2005 05:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.