Written on 2008年11月4日 @ 23:03 | by spirit | Tags: asp.net | 浏览:
若转载请注明出处: Spirit's Home
本文地址: http://www.7788sky.cn/post/asp.net_c_qubie.html
asp.net和C#的区别?又有人问起找个问题...这个跟问VC++和C++的区别是一样的。
C#是一中语言,ASP.NET是一个平台,上面支持用C#或者VB.Net写代码。 另外,C#不但可以开发基于ASP.NET的应用程序,也可以开发基于WinForm的程序。这就是asp.net和C #的区别。下面一段C#代码是zblog代码高亮测试,无意义。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
RadioButtonList1.SelectedIndex = 0;
}
static string MySelect = "";
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
if (CheckBoxList1.Items[CheckBoxList1.SelectedIndex].Selected)
{
MySelect = MySelect + "," + CheckBoxList1.SelectedValue;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("您所作的选择是:" + MySelect.Substring(1));
}
}
若转载请注明出处: Spirit's Home
本文地址: http://www.7788sky.cn/post/asp.net_c_qubie.html
0 Response to “asp.net和C#的区别”