jeg har jo posted min kode.. der er stort set ikke andet end det i min anden post.. det er ufattelig simpelt...
Koden er på en webusercontrol:
ASCX:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Account.ascx.cs" Inherits="x.WebControls.Account" TargetSchema="
http://schemas.microsoft.com/intellisense/ie5"%><asp:textbox id="textbox_password" width="260" runat="server" cssclass="textbox_default" style="Z-INDEX: 104; LEFT: 40px; POSITION: absolute; TOP: 108px"></asp:textbox>
<asp:button id="button_change_password" cssclass="button_default" text="Update" runat="server" onclick="UpdatePassword" style="Z-INDEX: 104; LEFT: 40px; POSITION: absolute; TOP: 338px"></asp:button>
ASCX.CS:
namespace x.WebControls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for Account.
/// </summary>
public class Account : System.Web.UI.UserControl
{
public TextBox textbox_password;
private void Page_Load(object sender, System.EventArgs e)
{
cls_CookieUtil c_cooke = new cls_CookieUtil();
c_user = new cls_User(c_cooke.UserIdTemp);
textbox_password.Text = c_user.Password;
}
#region Web Form Designer generated code
public void UpdatePassword(object sender, System.EventArgs e)
{
textbox_password.Text = "TEST";
}
}
}