473,785 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.P age by default.

2) The HTML created by default by Visual Studio does not contain
<HTML><HEAD><BO DY> 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 1844
Excellent. Thanks for your help Natty

Jon

"Natty Gur" <na***@dao2com. com> wrote in message
news:eB******** ******@tk2msftn gp13.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\Designe rTemplates\NewW ebFormCode.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\VBWiza rds"
2.2. Cut and paste existing wizard (WebForm).
2.3. in the ..\Templates\10 33\NattyPage.as px 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.as px";
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_N AME = NattyPage"
Param="WIZARD_U I = 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\103 3 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 = "DevNattyPa ge"
AssemblyName = "DevNattyPa ge"
HintPath = "..\..\..\dev\i nfra\DevNattyPa ge.dll"
/>
3.3. Alter the Scripts\1033\de fault.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 + "\\WebApplicati on.vbproj";
3.3.2. Use the AddFromDirector y function to create folders in the
project for every physical folder:
projitems.AddFr omDirectory(str TemplatePath + "\\html\\") ;
3.3.3. Use the AddFileToVSProj ect function to add File to the project :
item = AddFileToVSProj ect("Styles.css ", project, project.Project Items,
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*******@dao2c om.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
2655
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, Z.
2
1883
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 path of the file is truncated down to 8.3 format (with the ~1 at the end). When the Windows control is hosted in a windows form (for testing purposes) the full path is displayed. Is there some setting that will allow the full path to be displayed...
1
1223
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 generate html at the top of the page? For example... If some variable = 1 then the html at the top of the page will be "hello"
3
1949
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: 'codelib.editcode.Private Sub SaveRecord(sender As Object, e As System.EventArgs)' is not accessible in this context because it is 'Private'. What am I doing wrong? Everything is in one webform.
1
1521
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 = File.AppendText("file.log"); log.WriteLine(mess); log.Flush(); log.Close();
6
1889
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 code. I need to capture and render this html into my webform. Any ideas?
3
1465
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 = 12£34, output = 1234 Please would anyone say why this is? <body> <form name="Form1" method="post" action="WebForm3.aspx" id="Form1"> <input name="X" type="text" id="X">
2
1018
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 the message? Thanks, Trint .Net programmer trintsmith@hotmail.com *** Sent via Developersdex http://www.developersdex.com ***
7
5685
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 app unless it positively cannot be (for some technical reason). Or vice-versa? Obviously, Visual Studio could never be a Webform app because it requires a lot of CPU cycles. It appears to me that there is a broad sort of continuum in...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10341
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8979
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.