473,387 Members | 1,904 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,387 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 1812
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.