Using ASP .NET without Javascript

  • Thread starter Thread starter lbolognini
  • Start date Start date
L

lbolognini

Hi all,

lately I've been trying to build my first ASP .NET application.

This is the way I use buttons to submit forms:
[input id="btnSubmit" type="submit" value="Cook it!"
onserverclick="InsertNewRecipe" runat="server"]
(putting square brakets as I don't know how Google Groups treats HTML

These are the sample properties I use for ALL my validators:
http://img148.imageshack.us/my.php?image=clipboard017fj.jpg

So the question is: why do I keep getting ASP .NET generating
_UNWANTED_ Javascript?

Thanks,
Lorenzo
 
Hi,

start from here

Client Script in Web Forms Pages
http://msdn.microsoft.com/library/d...us/vbcon/html/vbconClientScriptInWebForms.asp

It's tell you which controls do require JavaScript.

Second thing is that you can set Page's ClientTarget to "downlevel" which
indicates that no script is sent to the client (as far as is possible within
the controls you use).

Here's also a bit more information
ASP.NET Server Controls and Browser Capabilities

http://msdn.microsoft.com/library/d.../vbconwebformscontrolsbrowsercapabilities.asp
 
More likely it means that the controls do not render inline styles within
their HTML elements (like style="width:300px"), but I cannot remember if it
disables totally outputting the CssClass attribute (which just spits out the
class="classname" to the tag). With quick look seems that it shouldn't (and
you can always put attributes out with Attributes property).
 
Teemu said:
More likely it means that the controls do not render inline styles within
their HTML elements (like style="width:300px"), but I cannot remember if it
disables totally outputting the CssClass attribute (which just spits out the
class="classname" to the tag). With quick look seems that it shouldn't (and
you can always put attributes out with Attributes property).

Hi Teemu,

thanks, got kinda of the same suggestion here:
http://discuss.joelonsoftware.com/default.asp?dotnet.12.157029.2

So it seems there is a hope. However, don't know if it's just a Beta 2
bug of Visual Web Developer 2005 which I'm using but setting the
ClientTarget @Page directive to downlevel (which oddly engough is not
available through intellisense) doesn't seem to have any effect.

Thanks,
Lorenzo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top