本文介绍了另一个简单的问题.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
   {
       myda = new SqlDataAdapter("Select EventName from Events where (EventDate='" + Calendar1.SelectedDate.ToString("s") + "'and UserId ='" + Session["Id"].ToString() + "')", mycn);
       dt = new DataTable();
       myda.Fill(dt);
       if (dt.Rows.Count == 0)
       {
           DataGrid1.Visible = false;
       }
       else
       {
           DataGrid1.Visible = true;
           DataGrid1.DataSource = dt;
           DataGrid1.DataBind();
       }
   }


myda =新的SqlDataAdapter(& quot;从事件中选择EventName其中(EventDate ='" + Calendar1.SelectedDate.ToString(& quot; s& quot;)
我只想简单地知道这是做什么的?


myda = new SqlDataAdapter("Select EventName from Events where (EventDate='" + Calendar1.SelectedDate.ToString("s")
i want to simply know about what is this s an what it do?

推荐答案



这篇关于另一个简单的问题.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 15:30