D8 aspx pages and dhtml and css and js

Posted on 2005-03-12
Medium Priority
Last Modified: 2013-11-19
Hi all
I am new to .net, so I am looking for conceptual and practical help.

Typically an aspx file looks like

<%@ Page language="c#" Debug="true" Codebehind="ThankYouForm.pas" AutoEventWireup="false" Inherits="ThankYouForm.TWebForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <meta name="GENERATOR" content="Borland Package Library 7.1">

  <body ms_positioning="GridLayout">
  <form runat="server">
    <asp:label id=Label1 style="LEFT: 14px; TOP: 6px" runat="server">     Thank you for your request. A link to the download site will be emailed to
    you shortly.     </asp:label>

Q1. I assume that I am free to edit this manually, however I wish eg add in standard html.
Is this true inside a form that has runat="server" ? can I just throw in a table or a paragraph or an H1 inside that form?

Q2. In the above example, there does not seem to be any advantage in having the server build this page .. ?? or am I missing something

Q3.  I'd like to use external stylesheets. Can I edit the above like so ?

  <form class=myformclass runat="server">
    <asp:label class=mylabelclass id=Label1 style="LEFT: 14px; TOP: 6px" runat="server">     Thank you for your request. A link to the download site will be emailed to
    you shortly.     </asp:label>

Q4. From the examples I have seen, the code is littered with embedded absolute positioning statements .. is there some way to clean this up?

Q5. Client side js and dhtml. Can I edit the above to include some client side script (eg for validation), and can I access the DOM in the normal way ?

some example code would be nice

Q6.  I have been talking about MANUALLY EDITING the generated aspx file .. it occurs to me that there might be some features in the IDE that I have not found yet that will help me  in inserting  client side script and event handlers and styles and stylesheets.. if so, where are they?

Q7.  What if I already have an existing HTML page that makes heavy use of JS and CSS and DHTML .. how can I port this, easily, to aspx?

General advice and code examples and pointers would be most welcome.

Thank you
Question by:Mutley2003
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Accepted Solution

Mohammed Nasman earned 1000 total points
ID: 13529659

Q1. Yes

Q2. Most of the server side logic write into code behind class, look on the page directive "Codebehind="ThankYouForm.pas"  which the delphi class that related to this web form.

Q3. Should no problem

Q4. You need to change the PageLayout to FlowLayout instead of GridLayout

Q5. Didn't understand that

Q6. mmm, I'm not sure, but try DreamWeaver, it's the best for editing page, also has support for asp/php and asp.net

Q7. If you have Html page, just add it to the project, then convert it to aspx, and should be handled without problem

I mostly work with C# and Vb.Net for asp.net, but the same concept valid for all .net development,


LVL 13

Assisted Solution

BlackTigerX earned 1000 total points
ID: 13536287
Q1. DreamWeaver (latest version) gives you a lot more flexibility to do all that kind of stuff

Q2. The advantage is that you can change the value of that label with a value from the server (a database, configuration or whatever)
if all there is is HTML, .NET will cache that and will serve the pages pretty fast, no worry there

Q5. Yes, you can add any custom javascript and hook it to any buttons (the buttons have to be HTML Controls, not Web Controls)

Q6. for validation specifically there is the Validators (RequiredFieldValidator, CompareValidator, RangeValidator, etc...) you just drop those in your form and set the required properties (ControlToValidate, ErrorMessage, etc) and they do all the "magic" for you

Author Comment

ID: 13552896
ok, I am getting there, thanks for the help

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question