I use VS.NET 2003 Edition and C#
I tried to complete Phile\Modules\admin\MyAccount.aspx ,but received the following message:
Page Error
--------------------------------------------------------------------------------
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.
The error occurred in:
http://localhost/Phile/Modules/Users/MyAccount.aspx
Error Message: Can't convert type¡C
--------------------------------------------------------------------------------
Stack Trace:
System.InvalidCastException: Can't convert type¡C at Coolnetboy.Phile.Modules.Users.MyAccount.Page_Load (Object sender, EventArgs e) in d:\inetpub\wwwroot\phile\modules\users\myaccount.a spx.cs:line 50 at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
Source Code:
private void Page_Load(object sender, System.EventArgs e)
{
// ¦b³o¸Ã©ñ¸m¨Ã¥êõ{¦¡½XÂ¥Hªì©l ¤Ãºô¶
RoleList.Visible=false;
if(!Page.IsPostBack)
{
DataSet states;
if(Context.User.Identity.IsAuthenticated)
{
Coolnetboy.WebModules.Accounts.Business.User currentUser =
new Coolnetboy.WebModules.Accounts.Business.User( (Coolnetboy.WebModules.Accounts.Business.PhilePrin cipal)Context.User);
FirstName.Text=currentUser.FirstName;
LastName.Text=currentUser.LastName;
states=AccountsTools.GetStates();
StateDropDown.DataSource=states;
StateDropDown.DataTextField="Description";
StateDropDown.DataValueField="StateCode";
StateDropDown.DataBind();
StateDropDown.SelectedIndex=StateDropDown.Items.In dexOf(StateDropDown.Items.FindByValue(currentUser. State));
}
}
Plese help me with this problem.
Thank you.