954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

php developer needs help in asp.net tables

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

ankitsuhail
Newbie Poster
1 post since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

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>
mani-hellboy
Junior Poster in Training
69 posts since Feb 2012
Reputation Points: 0
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: