后台代码:
protected void dalistfushi_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "showdetailfs")
{
string ware_id = ((HiddenField)e.Item.FindControl("labwareid")).Value;
string qstring = string.Format("proddetail.aspx?id={0}", ware_id);
Response.Redirect(qstring);
}
}
前台代码:<asp:DataList ID="dalistshuma" runat="server" RepeatDirection="Horizontal">
<ItemTemplate>
<table class="style3">
<tr>
<td align="center">
<asp:ImageButton ID="ibtshuma" runat="server" Width="162" Height="162"
CommandName="showdetailsm" />
</td>
</tr>
跟踪值都取到了 为什么页面跳转提示无法打开页面
protected void dalistfushi_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "showdetailfs")
{
string ware_id = ((HiddenField)e.Item.FindControl("labwareid")).Value;
string qstring = string.Format("proddetail.aspx?id={0}", ware_id);
Response.Redirect(qstring);
}
}
前台代码:<asp:DataList ID="dalistshuma" runat="server" RepeatDirection="Horizontal">
<ItemTemplate>
<table class="style3">
<tr>
<td align="center">
<asp:ImageButton ID="ibtshuma" runat="server" Width="162" Height="162"
CommandName="showdetailsm" />
</td>
</tr>
跟踪值都取到了 为什么页面跳转提示无法打开页面
不用string.Format试试