一个产品信息第一页列表,第二页详细信息,第一页链接写好了,第二页怎么写? string id = Request["id"]; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void Page_Load(Object Src, EventArgs E ) { myConnection = new SqlConnection("server=(local)\\NetSDK;database=pubs;Integrated Security=SSPI"); String selectCmd = "select t.title_id, t.type, t.pub_id, t.price " + "from titles t, titleauthor ta, authors a " + "where ta.au_id=@Id AND ta.title_id=t.title_id AND ta.au_id = a.au_id"; SqlDataAdapter myCommand = new SqlDataAdapter(selectCmd, myConnection); myCommand.SelectCommand.Parameters.Add(new SqlParameter("@Id", SqlDbType.NVarChar, 11)); myCommand.SelectCommand.Parameters["@Id"].Value = Request.QueryString["id"]; DataSet ds = new DataSet(); try { myCommand.Fill(ds, "Titles"); MyDataGrid.DataSource=ds.Tables["Titles"].DefaultView; MyDataGrid.DataBind(); } catch (Exception) {} } 正则概念问题` ajaxpro2.dll 两处调用了后台的方法。 ASP.NET怎样取多个DropDownList控件的值,然后将它insert进数据表。 DataGrid中的删除按钮 为什么单击一次却删除了两行? .net中有没有一种txt控件,我设定了宽度后,当某行字符数达到行尾时自动自动添加换行符,换到下一行? 高分求DeKlarit的使用说明和教程! Calendar控件问题 菜鸟求助 关于文本框样式 !急!高分,在线等待答复! 如何安装ASP.Net开发环境? 不好意思,几天前谁发了一个短信给我?内容挺长的?CSDN把它删了.我看不到了。 为什么我的水晶报表不能显示图表呢?
{
myConnection = new SqlConnection("server=(local)\\NetSDK;database=pubs;Integrated Security=SSPI"); String selectCmd = "select t.title_id, t.type, t.pub_id, t.price "
+ "from titles t, titleauthor ta, authors a "
+ "where ta.au_id=@Id AND ta.title_id=t.title_id AND ta.au_id = a.au_id"; SqlDataAdapter myCommand = new SqlDataAdapter(selectCmd, myConnection); myCommand.SelectCommand.Parameters.Add(new SqlParameter("@Id", SqlDbType.NVarChar, 11));
myCommand.SelectCommand.Parameters["@Id"].Value = Request.QueryString["id"]; DataSet ds = new DataSet();
try {
myCommand.Fill(ds, "Titles");
MyDataGrid.DataSource=ds.Tables["Titles"].DefaultView;
MyDataGrid.DataBind();
} catch (Exception) {}
}