我要把ASP代码改成ASP.NET代码应该怎么写?帮帮忙吧,我.NET不会啊~
这是前一张其中一点
<table width= "100% " border= "0 " cellspacing= "0 " cellpadding= "0 ">
<tr>
<td> <table width= "95% " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td> </td>
</tr>
</table>
<%
if request( "action ")= "del " then
call del()
else
call List()
end if
%>
<%sub List()%>
<table width= "95% " border= "0 " align= "center " cellpadding= "0 " cellspacing= "1 " bgcolor= "#CCCCCC ">
<tr align= "center " bgcolor= "f3f3f3 ">
<td width= "15% "> 编号 </td>
<td width= "18% "> 姓名 </td>
<td width= "16% "> 联系电话 </td>
<td width= "13% "> 资料 </td>
<td width= "16% "> 操作 </td>
</tr>
<%
set rs = server.CreateObject ( "Adodb.recordset ")
sql= "select * from feedback order by id desc "
rs.open sql,conn,1,1
Dim ipagecount,pagenum
Dim ipagecurrent
Dim total
Dim irecordsshown
if request.QueryString( "page ")= " " then
ipagecurrent=1
else
ipagecurrent=cint(request.QueryString( "page "))
end if
pagenum=20
rs.pagesize = pagenum
ipagecount=rs.pagecount
total=rs.recordcount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write " <tr> <td colspan=5 height=20> 对不起,目前还没有留言投入! </td> </tr> "
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown <pagenum and NOT rs.EOF
%>
<tr align= "center " bgcolor= "#FFFFFF ">
<td height= "25 "> <%=rs( "id ")%> </td>
<td> <%=rs( "name ")%> </td>
<td> <%=rs( "tel ")%> </td>
<td> <a href= "admin_support_show.asp?id= <%=rs( "id ")%> " target= "_blank "> 查看 </a> </td>
<td> <a href= "Manage_Book.asp?action=del&id= <%=rs( "id ")%> "> 删除 </a> </td>
</tr>
<%
irecordsshown=irecordsshown+1
rs.movenext
loop
end if
%>
</table>
<table width= "95% " border= "0 " align= "center " cellpadding= "0 " cellspacing= "0 ">
<tr>
<td height= "30 " align= "center "> 共 <strong> <%=total%> </strong> 个 <a href= "Manage_Book.asp?&page=1 "> 首页 </a> <a href= "Manage_Book.asp?page= <%=ipagecurrent-1%> "> 上一页 </a> <a href= "Manage_Book.asp?page= <%=ipagecurrent+1%> "> 下一页 </a> <a href= "Manage_Book.asp?&page= <%=ipagecount%> "> 尾页 </a> 页次: <%=ipagecurrent%> / <%=ipagecount%> 页 <strong> <%=pagenum%> </strong> 个/页 </td>
</tr>
</table>
<%
end sub
%>
<%
sub del()
sql= "delete from feedback where id= "&request( "id ")
conn.execute(sql)
response.redirect Request.ServerVariables( "HTTP_REFERER ")
end sub
%>
</td>
</tr>
</table>
这是后一张,要把对应ID的信息显示出来
<div align= "center ">
<table width= "95% " border= "0 " cellpadding= "4 " cellspacing= "1 " bgcolor= "#CCCCCC ">
<tr align= "center " bgcolor= "#00CCCC ">
<td colspan= "2 "> 用户详细信息 </td>
</tr>
<%
set rs=server.CreateObject( "adodb.recordset ")
sql= "select * from feedback where id= "&request( "id ")
rs.open sql,conn,1,1
%>
<tr>
<td width= "46% " align= "center " bgcolor= "#D0F3FF "> 用户ID: </td>
<td width= "54% " bgcolor= "#FFFFFF "> <%=rs( "id ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 姓名: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "name ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> E-mail: </td>
<td bgcolor= "#FFFFFF "> <a href= "mailto: <%=rs( "email ")%> "> <%=rs( "email ")%> </a> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 电话: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "tel ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 传真: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "fax ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 公司: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "company ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 地址: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "addr ")%> </td>
</tr>
<tr>
<td align= "center " bgcolor= "#D0F3FF "> 留言: </td>
<td bgcolor= "#FFFFFF "> <%=rs( "message ")%> </td>
</tr>
</table>
</div>
[解决办法]
不会你还来改?
看书去,否则,即使改了之后,你就会了迈?
[解决办法]
先学习,再改。
[解决办法]
学习吧!
[解决办法]
完全不一样的2个东西...
id= "&request( "id ") 在asp.net C#中
Request.QueryString[ "id "]取得..
但要把.cs或.vb文件编译成.dll才能用啊..和ASP完全2个概念