Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 22 August 2012 - 08:38 PM

Hi. I'm a beginner and I'm working in Sams Teach Yourself Asp.net in 24 hours book. I'm using Microsoft Web Matrix. If anyone has the book, I'm on page 66.

I'm trying to drag a textbox onto the design screen. I'm getting an error message. It says...
Error Rendering Control - TextBox1
An unhandled exception has occured
RegisterForEventValidation can only be called during Render();

I haven't changed any code, but I'll add it anyway. Thanks in advance!

Re: Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 24 August 2012 - 02:53 PM

Is this error coming from visual studio or webmatrix? Your file looks like a standard aspx page that you would see when creating a webforms project. WebMatrix usually creates WebPage projects which use cshtml or vbhtml files which look a bit different than an aspx file.

Re: Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 24 August 2012 - 04:01 PM

It is coming from Web Matrix. It is an older version of Web Matrix. The book I'm using is from 2003 that I checked out at the library. I downloaded Web Matrix and .Net Framework Redistributable from the cd rom inside the book. I use Windows 7. Do you think the problem comes from the Web Matrix being so old.

Re: Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 24 August 2012 - 04:19 PM

This web matrix is definitely using HTML and VB. You can either type in the HTML/source code manually or you can drag and drop items onto a design screen. When dragging and dropping, the HTML code is automatically generated by the computer.

The Web Control menu has labels, literals, textboxes, checkboxes, etc. There is also an HTML menu with textboxes, buttons, literals, and so on. The example I'm working on.....says to drag a textbox from the Web control menu and drop it onto the design screen.

Re: Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 24 August 2012 - 04:52 PM

The 2003 web matrix was a short lived product. If I were you I'd look at getting a more current version of webmatrix and and visual web developer express. Both are free from Microsoft. It doesn't make a lot of sense to learn a development tool that is not supported anymore and that has been replaced with better tools.

Re: Beginner: Dragging Textbox in Design Mode...Getting Error

Posted 25 August 2012 - 06:58 AM

A good place to start is at www.asp.net, they have a lot of good beginner tutorials on pretty much everything to do with asp.net. Here's the link to their webmatrix tutorials. And if you go to the parent forum for this thread you'll find a sticky named "asp.net resources", there's a lot of suggestions on where to get started in there.