asp.net学习时发现取不到文本框的值?
我新建的一个 .ascx文件,在里面加了几个文本框,但我取不到值,是怎么回事,应该怎么取值?以下是我的代码:
C# code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using Web.test.Model;
public partial class editPage : System.Web.UI.UserControl
{
public string id
{
set { this.txtId.Text = value; }
get { return this.txtId.Text; }
}
public string title
{
set { this.txtTitle.Text = value; }
get { return this.txtTitle.Text; }
}
public string keyWord
{
set { this.txtKeyword.Text = value; }
get { return this.txtKeyword.Text; }
}
public string descript
{
set { this.txtContent.Text = value; }
get { return this.txtContent.Text; }
}
Article a = new Article();
protected void Page_Load(object sender, EventArgs e)
{
string id=Request.QueryString["ID"];
this.a = MoreTableDAO.findDetailByID(Convert.ToInt32(id));
txtId.Text = Convert.ToString(a.articleId);
txtTitle.Text = this.a.title;
txtKeyword.Text = this.a.keyWord;
txtContent.Text = this
相关问答:
select top 12 * from Product where [id] not in (select top 12 [id] from Product)
这样可以分页,但是我在后面想加个条件
select top 12 * from Product where [id] not in (select top 12 [id] from Prod ......
前段时间碰到一道面试题如下:
test.aspx页面有如下代码:
Response.Write(Test.GetDate());
Test类如下:
public class Test
{
static string dt="";
public static s ......
哪位大哥有没有ASP.NET中利用Cookies实现用户自动登录的代码...谢谢了...越详细越好....
什么意思?自动登录?
mark 貌视是存储cookies 我也对cook比较迷糊 关注下
既然你知道用cookies自己动动大脑多好! ......
比较好的学习asp.net的书推荐一下吧,谢谢~~~
書的話等高人推薦, 我認為多上上www.asp.net對你幫助挺大, 那里有很多視頻, 如果是新手的話, 視& ......
现在想一个事件来执行一个函数
这个事件是在每个用户访问网站时就会触发,但是在当前访问只能触发一次
我就是想做一个在线人数,当访问这个站时就触发,以后就不在触发了
除非关闭网站后,在打开 ......