WebForm Default HTML

Discussion in 'ASP .Net' started by Jon Booth, Aug 19, 2003.

  1. Jon Booth

    Jon Booth Guest

    I am using ascx controls to build headers and footers for my wbe
    application.
    3 questions

    1) How do I set it so that when I create a new web form created inherits
    from my SecurePage class and not System.Web.UI.Page by default.

    2) The HTML created by default by Visual Studio does not contain
    <HTML><HEAD><BODY> etc as my ascx files already contain this. Ho can I
    modify the HTML it provides by default?

    3) ALl I want is basically <FORM> and </FORM> to begin with. VS complains
    that they need a parent element, which is of course proviced by the ascx at
    runtime. How can I stop it from complaining?

    Thanks for any help you can give
    Jon
     
    Jon Booth, Aug 19, 2003
    #1
    1. Advertising

  2. Jon Booth

    Jon Booth Guest

    Excellent. Thanks for your help Natty

    Jon

    "Natty Gur" <> wrote in message
    news:...
    > You need to alter Templates.
    >
    > those instructions are for VB7 but C# is the save.
    >
    > Steps to create enterprise templates for VB7
    >
    > 1. Altering the "C:\Program Files\Microsoft Visual Studio
    > NET\Vb7\DesignerTemplates\NewWebFormCode.vb" script if you want to
    > alter the default code behind for web form. The demo changes the
    > assessor page class.
    > 2. Creating wizard for your page:
    > 2.1. create directory with the wizard name under "C:\Program
    > Files\Microsoft Visual Studio .NET\Vb7\VBWizards"
    > 2.2. Cut and paste existing wizard (WebForm).
    > 2.3. in the ..\Templates\1033\NattyPage.aspx sub Dir put the aspx file
    > that contain predefine controls. (the demo contain template of page with
    > navigation area, tool bar,.)
    > 2.4. Alter the script in ..\Scripts\1033\default.js so he will add your
    > aspx file :
    > var strTemplateFile = strTemplatePath + "\\NattyPage.aspx";
    > 2.5. Create new vbz file with the new form template name in ..\
    > VBProjectItems dir.
    > 2.6. Cut and paste existing vbz file content and alter the WIZARD_NAME
    > to your template form name. The file should look like :
    > VSWIZARD 6.0
    > Wizard=VsWizard.VsWizardEngine
    > Param="WIZARD_NAME = NattyPage"
    > Param="WIZARD_UI = FALSE"
    > Param="PROJECT_TYPE = VBPROJ"
    > 2.7. Find the right vsdir file (exists under VBProjectItems Dir) and
    > alter it. The sample alter WebProjectItems.vsdir.
    > 3. Creating wizard for Web project
    > 3.1. Create directory with the wizard name at the same location as
    > specify at 2.a (the sample alter the default web application)
    > 3.2. In the .\Templates\1033 directory put all the files that you want
    > to put into the project. Here you can put your template page, alter any
    > file, add sub directories with data and alter the vbproj to reference
    > assemblies :
    > <Reference
    > Name = "DevNattyPage"
    > AssemblyName = "DevNattyPage"
    > HintPath = "..\..\..\dev\infra\DevNattyPage.dll"
    > />
    > 3.3. Alter the Scripts\1033\default.js file. This file responsible for
    > creating the project.
    > 3.3.1. Set the variable that hold the project name to your name :
    > var strTemplateFile = strTemplatePath + "\\WebApplication.vbproj";
    > 3.3.2. Use the AddFromDirectory function to create folders in the
    > project for every physical folder:
    > projitems.AddFromDirectory(strTemplatePath + "\\html\\");
    > 3.3.3. Use the AddFileToVSProject function to add File to the project :
    > item = AddFileToVSProject("Styles.css", project, project.ProjectItems,
    > strTemplateFile, false);
    > (The sample shows how to add NattyPage into sub directory called HTML)
    > 3.4. Add vbz file and alter the right vsdir file as explained in 2.
    >
    >
    >
    > Natty Gur, CTO
    > Dao2Com Ltd.
    > 34th Elkalay st. Raanana
    > Israel , 43000
    > Phone Numbers:
    > Office: +972-(0)9-7740261
    > Fax: +972-(0)9-7740261
    > Mobile: +972-(0)58-888377
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Jon Booth, Aug 19, 2003
    #2
    1. Advertising

  3. Jon Booth

    Natty Gur Guest

    Its actually come with demo files. E-mail me if you want them.
    .

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Aug 19, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. titof
    Replies:
    0
    Views:
    516
    titof
    Jul 24, 2003
  2. timmso
    Replies:
    1
    Views:
    501
    Alex Papadimoulis
    Dec 12, 2003
  3. =?Utf-8?B?bXN1aw==?=

    Using one webform to set a value on another webform

    =?Utf-8?B?bXN1aw==?=, Jul 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    471
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 12, 2006
  4. =?Utf-8?B?Vk1J?=

    Moving value from popup Webform to main Webform?

    =?Utf-8?B?Vk1J?=, Oct 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    581
    GroupReader
    Oct 9, 2006
  5. Luqman
    Replies:
    2
    Views:
    667
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 11, 2007
Loading...

Share This Page