Bi tane web form hazırlıyorum üye kayıt sistemi için. Böyle biir hata veriyor :(
Server Error in '/eposta' Application. --------------------------------------------------------------------------------
Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 62: command.Parameters.Add("@Cinsiyet", "DropDownListCINSIYET.SelectedValue") Line 63: command.Parameters.Add("@Medeni Hal", "DropDownListMEDENI.SelectedValue") Line 64: command.Parameters.Add("@ED", TxtED.Text) Line 65: command.Parameters.Add("@Sirket", TxtSIRKET.Text) Line 66: command.Parameters.Add("@Semt", TxtSEMT.Text)
[NullReferenceException: Object reference not set to an instance of an object.] eposta.WebForm1.Gonder_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\eposta\uyekayit.aspx.vb:64 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1277
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
quote:
Line 62: command.Parameters.Add("@Cinsiyet", "DropDownListCINSIYET.SelectedValue") Line 63: command.Parameters.Add("@Medeni Hal", "DropDownListMEDENI.SelectedValue") Line 64: command.Parameters.Add("@ED", TxtED.Text) Line 65: command.Parameters.Add("@Sirket", TxtSIRKET.Text) Line 66: command.Parameters.Add("@Semt", TxtSEMT.Text)
burada DropDownListCINSIYET.SelectedValue'yi tirnak isareti icine almadan yazmayi dene.(altindaki satir da ayni sekilde...) ikincil olarak; TxtED, TxtSIRKET ve TxtSEMT id'lerini kontrol et, belki birini yanlis yazmissindir.
aha sorunu buldum :)
Sen yerel ayarların txtSIRKET i txtsirket diye degistir(aynı şekilde kontrolün ismini de)...
Vs.net in böyle bir mallığı var(beta2). Ben bir ay önce falan yaptım bir site. Localde çalışıyordu ama hostta böyle bir problem veriyordu... Sonra anlıyorsun...
Sanırım hatanın sebebi bu ama bilmiyorum emin değilim