Can Anyone please show me how to implement the same type of funtionality, shown i the code below, in asp.net 2.0?
PLease send me the procedure to get the thing done in vs2005. Or just the code will do for the .aspx &.aspx.cs.
Hope to get some needed reply soon.
Thank You
<?php
$sql="select * from table";
$query=mysql_query($sql) or die("Query failed : " . mysql_error());
$row=mysql_fetch_array($query);
?>
<td width="501" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="999" height="25" align="center" valign="middle"><?php print $_SESSION['msg'];$_SESSION['msg']=""; ?></td>
</tr>
</table>
<?php do { ?>
<div align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="114" height="25" align="right" valign="middle"><strong>Question-<?php echo $row['id'];?> :</strong></td>
<td width="11" align="left" valign="middle"><!--DWLayoutEmptyCell--> </td>
<td colspan="4" align="left" valign="middle"><?php echo $row['question'];?></td>
</tr>
<?php if ($row['type']=="MC") { ?>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option1 :</strong></td>
<td colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="819" align="left" valign="middle"><?php echo $row['option1'];?></td>
</tr>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option2 :</strong></td>
<td colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td align="left" valign="middle"><?php echo $row['option2'];?></td>
</tr>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option3 :</strong></td>
<td width="5" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="5"> </td>
<td align="left" valign="middle"><?php echo $row['option3'];?></td>
</tr>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option4 :</strong></td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td align="left" valign="middle"><?php echo $row['option4'];?></td>
</tr>
<?php } else if ($row['type']=="TF") { ?>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option1 :</strong></td>
<td colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td width="819" align="left" valign="middle"><?php echo $row['option1'];?></td>
</tr>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Option2 :</strong></td>
<td colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td>
<td align="left" valign="middle"><?php echo $row['option2'];?></td>
</tr>
<?php } ?>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>Right Option :</strong></td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td align="left" valign="middle"><?php echo $row[$row['right_opt']];?></td>
</tr>
<tr>
<td height="25" colspan="3" align="right" valign="middle"><strong>QuestionType :</strong></td>
<td valign="top"><!--DWLayoutEmptyCell--> </td>
<td> </td>
<td align="left" valign="middle"><?php echo $row['type'];?></td>
</tr>
<tr>
<td height="25" colspan="6" align="center"><a href="del_question.php?id=<?php echo $row['id'];?>">Delete</a> / <a href="edit_question.php?id=<?php echo $row['id'];?>">Edit</a></td>
</tr>
<tr>
<td height="1"></td>
<td></td>
<td width="45"></td>
<td></td>
<td></td>
<td></td>
</tr>
</table></div>
<?php $qno=$qno+1;} while ($row=mysql_fetch_array($query)) ; ?>