我市菜鸟,救命呀,急用,在线等 为什么不在代码里获取数据集的该字段?请说详细点! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="c#" runat="server">SqlConnection myconn;public void Page_Load(object src,EventArgs e){string myconnstring="server=10.130.242.24;Trusted_Connection=true;database=xfdatabase";myconn=new SqlConnection(myconnstring);myconn.Open();if(!Page.IsPostBack){BindDataList();}}ICollection CreateTable(){DataSet ds=new DataSet();SqlDataAdapter myadapter_rep=new SqlDataAdapter("GetReport",myconn);myadapter_rep.Fill(ds,"report");public void BindDataList(){source.DataSource=CreateTable();source.DataBind();}public void DataList_ItemCommand(object src,DataListCommandEventArgs e){source.SelectedIndex=e.Item.ItemIndex;BindDataList();}</script><asp:DataList ID="source" runat="server" OnItemCommand="DataList_ItemCommand" RepeatLayout="Table" Width="100%"> <itemtemplate> <span class="message"><img src="../images/dot17.gif" width="9" height="14"> <asp:HyperLink Text='<%# DataBinder.Eval(Container.DataItem,"zt") %>' NavigateUrl='<%# "shownews.aspx?newsid="+DataBinder.Eval(Container.DataItem,"newsid")+"&selection=" + Container.ItemIndex %>' Target="_blank" ID="link" runat="server"></asp:HyperLink> <%# DataBinder.Eval(Container.DataItem,"showdate","{0:yyyyMMdd}") %> <% string spic; //spic=DataBinder.Eval(ds.Tables["report"],"showdate"); %> </span> </itemtemplate> <selecteditemtemplate> <%# DataBinder.Eval(Container.DataItem,"zt") %><br> </selecteditemtemplate> </asp:DataList>我现在要把这个值<%# DataBinder.Eval(Container.DataItem,"zt") %>赋给一个变量,怎么实现 C# datagridview 操作 C#页面!在线等 dll 文件咋用? 用C#如何实现C/S三层架构 Remoting 的服务器侧如何获知Client的IP地址 C#调用OCX出错。 内网的数据库跟公网的数据库是否可以复制? C#调用C写的DLL 怎么在winform下的dataGrid中加控件 部署(打包)WEB项目的问题 c#写的应用程序,只能运行在装.net的机器上吗 InstallShield X Express 怎么才能制作中文的安装程序?
SqlConnection myconn;
public void Page_Load(object src,EventArgs e)
{
string myconnstring="server=10.130.242.24;Trusted_Connection=true;database=xfdatabase";
myconn=new SqlConnection(myconnstring);
myconn.Open();
if(!Page.IsPostBack)
{
BindDataList();
}
}ICollection CreateTable()
{
DataSet ds=new DataSet();
SqlDataAdapter myadapter_rep=new SqlDataAdapter("GetReport",myconn);
myadapter_rep.Fill(ds,"report");public void BindDataList()
{
source.DataSource=CreateTable();
source.DataBind();
}public void DataList_ItemCommand(object src,DataListCommandEventArgs e)
{
source.SelectedIndex=e.Item.ItemIndex;
BindDataList();
}
</script>
<asp:DataList ID="source" runat="server" OnItemCommand="DataList_ItemCommand" RepeatLayout="Table" Width="100%">
<itemtemplate> <span class="message"><img src="../images/dot17.gif" width="9" height="14">
<asp:HyperLink Text='<%# DataBinder.Eval(Container.DataItem,"zt") %>' NavigateUrl='<%# "shownews.aspx?newsid="+DataBinder.Eval(Container.DataItem,"newsid")+"&selection=" + Container.ItemIndex %>' Target="_blank" ID="link" runat="server"></asp:HyperLink>
<%# DataBinder.Eval(Container.DataItem,"showdate","{0:yyyyMMdd}") %>
<%
string spic;
//spic=DataBinder.Eval(ds.Tables["report"],"showdate");
%>
</span> </itemtemplate>
<selecteditemtemplate> <%# DataBinder.Eval(Container.DataItem,"zt") %><br>
</selecteditemtemplate>
</asp:DataList>
我现在要把这个值<%# DataBinder.Eval(Container.DataItem,"zt") %>赋给一个变量,怎么实现