I am trying to expand my knowledge, and for 'backend' programming I use ASP.NET. I am trying to make a very simple CMS, and currenty Im on creating a blog post with just a title and topic. Works good, sends data to database, and on, lets say blog.aspx it shows data. But when I used ASP.NET 'LoginView', where I set up that if a user is anonymous, he only sees '?'. While if a user is logged in he will be able to publish a post. After that, it does not work. Just does not. When I click on a button to send the data, it shows error 'Object reference not set to an instance of an object.'.
Picture of my error : http://imgur.com/T9DEsgm
My simple code to send data: http://imgur.com/32ITgTR
My setup for making a post in design mode: http://imgur.com/zK48u3S
I wouuld really appreciate any help with ASP.NET, its really giving me problems.
Should I just give up on it and move to PHP/MySQL?
2 Replies - 858 Views - Last Post: 07 February 2017 - 12:34 PM
#1
Having problems with sending simple data to database
Posted 07 February 2017 - 11:14 AM
Replies To: Having problems with sending simple data to database
#2
Re: Having problems with sending simple data to database
Posted 07 February 2017 - 11:17 AM
ASP.NET operates just like desktop .NET so giving up seems silly.
Please post your code where the exception is happening and paste the entire error message.
Please post your code where the exception is happening and paste the entire error message.
#3
Re: Having problems with sending simple data to database
Posted 07 February 2017 - 12:34 PM
I will post the code whn Im on my laptop. I believe the problem is in tge loginview? When it is not there, ot works, but when I add it to loginview so only logged in users can see it, it gives me the error. I have posted 3 images which I thought might helo.
Page 1 of 1