473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

WebForm Default HTML

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
Nov 17 '05 #1
2 1809
Excellent. Thanks for your help Natty

Jon

"Natty Gur" <na***@dao2com.com> wrote in message
news:eB**************@tk2msftngp13.phx.gbl...
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!

Nov 17 '05 #2
Its actually come with demo files. E-mail me if you want them.
SP*******@dao2com.com.

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!
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Zingam | last post by:
Is it possible to insert a WinForm in a WebForm? I'd like for example to insert a managed directx viewer in a webform, that would display 3d graphics on the form? Is this possible? Regards,...
2
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. When the file is dropped onto the listbox, the...
1
by: cloverme | last post by:
I have a couple of questions about coding (using vb.net) to a webform. Thanks in advance for your help. I'm a little new to vb.net, but a VB veteran. 1) When the page loads, how can I...
3
by: Tim Zych | last post by:
If I declare a procedure in a webform as Public and attach it to a button in the same webform, it runs fine. If I change it to Private Sub and try to click it i get the error: ...
1
by: Christian (France) | last post by:
I created a class to log application event in my webform. This "Logs" class contains only one static method : static void WriteLog(string mess) { StreamWriter log log =...
6
by: Skeptical | last post by:
Hello, I am trying to embed html output into my webform but could not figure out how to so far. The form will execute a Perl script with some parameters, and script will output some html...
3
by: ChainsawDude | last post by:
I am posting from a HTML form (below) to a aspx webform. This works OK but I notice the £ character (pound sign) is dropped! i.e. not picked up by a Request.Form in the webform e.g. input =...
2
by: Trint Smith | last post by:
I need to allow someone to communicate by email from my webform without knowing the receivers email...Is there some vb.net code to do that using one of my servers email accounts as the sender of...
7
by: Dean Slindee | last post by:
I would like to hear some practical comments about how to decide whether a new application becomes a Winform vs a Webform application. Would you say that every app should be, by default, a Winform...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.