2 Replies - 423 Views - Last Post: 07 February 2017 - 12:34 PM

#1 BrS  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 07-December 16

Having problems with sending simple data to database

Posted 07 February 2017 - 11:14 AM

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?

Is This A Good Question/Topic? 0
  • +

Replies To: Having problems with sending simple data to database

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13401
  • View blog
  • Posts: 53,498
  • Joined: 12-June 08

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.
Was This Post Helpful? 0
  • +
  • -

#3 BrS  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 07-December 16

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1