-1

hi
i humbly need some help. I am a php developer but now I am learning asp.net with c# as it is a requirement of our company. I am familiar with the basics of c# and oops. The problem i am facing is that i learned how to retrieve values from the database and make a data table now from this i know that i can bind a grid control to display the data but this technique restricts me to do some of my own stuff to the datagrid now what i want is that i used to hard code the table in php if i needed to build a table
like

<?php
*/
retrive the data from the database and store it in an array using $row_sql = mysql_fetch_array() function
/*
....
....
?>
<table>
<tr>
<td><?php $row_sql['fieldname']; ?></td>
</tr>
....
....

</table>
?>

i know that i can do such a thing with a repeater but not sure that i want to use such a control or its just because that i am not so familiar with asp.net style.

so can anyone please guide me how can i do this.
or please tell me what should i do to learn asp.net if i know how to do it in php?

thanking you in advance

Edited by ankitsuhail: spellings mistakes

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by mani-hellboy
-1

You can us following code

<%
cmd="Query"
sqldatareader reade=cmd.ExecuteReader() 
reade.Read()
%>
<table>
//put loop here
<tr>
<td><%= reade[row_index].getvalue(col_index or col_name)%>
</td>
<tr>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.