Arama butonu
Bu konudaki kullanıcılar: 1 misafir
3
Cevap
392
Tıklama
0
Öne Çıkarma
Object reference Problemi
P
20 yıl
Er
Konu Sahibi

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)


Source File: c:\inetpub\wwwroot\eposta\uyekayit.aspx.vb Line: 64

Stack Trace:


[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

DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.

Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.

Üye Ol Şimdi Değil



U
20 yıl
Binbaşı

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.


Bu mesaja 1 cevap geldi.
T
20 yıl
Yüzbaşı

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


Bu mesaja 1 cevap geldi.
P
20 yıl
Er
Konu Sahibi

tamam sorun halloldu, Db ayarlar1nda sorun varm1$



DH Mobil uygulaması ile devam edin. Mobil tarayıcınız ile mümkün olanların yanı sıra, birçok yeni ve faydalı özelliğe erişin. Gizle ve güncelleme çıkana kadar tekrar gösterme.