asp.net - How can I print a value in my page from Database -
How can I display information in my page in asp.net 2008 (ranging from db)
Currently I use GridView, but it displays information in a table, I want to display it in a normal line For example: I have this table in my DB
I want to print a notice in my page:
You are the one and your id is: 1
without using GridView.
How are you getting your data from your database to your gridview? Do you want to display only one record or will you show many records?
Repeaters have a great control if you want to display all the records. You can tie it in the form of your compulsive grid, then you can define your template to render HTML.
If you want to display only one record, you can do this page. For example:
Page_Load () {if (IsPostBack) // Make sure that it only calls for the first time that we call the page {// get its data from DB Do not even help // You provide more details MyData data = .... myLabel.Text = "You" + Data ["Name"]. ToString () ....}} If you update your question more frequently, details about your data source (you are using data table custom object etc.) ..) I can update my answer with a better Exxcale
Comments
Post a Comment