Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Wednesday, March 28, 2012

Trouble building aspx page in the HTML designer

Hi,

I am building a aspx page. I have noticed that when use <Table><Tr><Td> with
<asp:Checkbox> that the intellisense does not show for <asp:whateverObject> Is there a way to show the intellisense for asp .net objects? If so, how. Or you just can't mix the two. Furthermore, I am building the page through the HTML designer.

Any help will be very much appreciated.

Thanks,

poc1010What HTML Designer are you using? I know that intellisense works with VS.net and maybe WebMatrix. Beyond that I'm not sure.

Jeff
Jeff,

I am using VS.Net. It does work when I only use <asp:Table><asp:TableRow><asp:TableCell> and then use the <asp:any object>. But it does not work when you use <Table><Tr><Td> and then use the <asp:any object>. I am modifying code and do not wish to change the whole page.

I thought there was a way.

Thanks,

poc1010
It should still work. What version of visual studio are you using? What operating system?

Jeff
Jeff,

I am using vs.net 2003 and windows 2000 NT.

poc1010
Which did you install first: visual studio.net or IIS?

Jeff

Monday, March 26, 2012

Trouble editing HTML Elements version 0.6

Hi
I just encountered something very weird. I opened an existing aspx fileto make some changes. When I click on an HTML element, such as a textbox, I get the open squares that say it is selected. The Propertieswindow opens up on the right but when I try to make any changes in thatwindow, the open squares become gray squares around the HTML element.Certain properties (e.g. Type) can be changed. Others such as ID cannot be changed. However I can go into the HTML code and make thechanges there. I am using version 0.6 of ASP.NET.
Any ideas on what happened? If it helps, I am working on the Guest Book example in Chapter 10 of Mike Pope's starter book.
Danny Low

version 0.6 of ASP.NET


As far as I know there has never been a ver. 0.6 of Asp.Net. You are either using ver. 1.0, 1.1 or 2.0. Are you perhaps talking about some kind of development tool here, like Visual Studio?

As far as I know there has never been a ver. 0.6 of Asp.Net.
When you ask for version number with Help->About the window thatpops up says version 0.6 build(812). This is what I downloaded from theasp.net download section.
Danny Low

What window is this? Asp.Net is part of the .NET Framework and does not come with an Interface. There are three versions of .NET; 1.0, 1.1 and 2.0. Is it Web Matrix your are referring to??
Yes, it is Web Matrix that I am referring to. All I did was save myaspx file at a convenient stop point and shut down my system for thenight. The next day when I resumed working on the sample program, I noticed the weird behavior of not being able to edit some propertiesof the page elements when in the Design mode. And it is not just theexisting elements but any new elements that I add to the page.
Danny

Saturday, March 24, 2012

Trouble saving html in a string variable

I'm trying to allow a user to enter html text into a textBox (FreeTextBox) but am getting an error upon submitting:

A potentially dangerous Request.Form value was detected from the client (noteTextBox="<H2><FONT size=6>asd...").
Description:Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Exception Details:System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (noteTextBox="<H2><FONT size=6>asd...").

Anybody know how to deal with this while still allowing me to save the html?

<%@. Page...... ValidateRequest="false".....%>


I think the reason for this error was that someone could enter a <script> tag in your textbox with javascript code, and then if you grab that value from the form and display directly it on another page, the code in the <script> tag would be executed on your user's computer... this could be potentially bad. i usually turn the error off though, like the previous poster. If you HtmlEncode() anything that you display that ultimately came from the user, it should be ok to turn it off.


How do I HtmlEncode() this text?


dim myText as String = Server.HtmlEncode(yourTextbox.Text)