473,378 Members | 1,447 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,378 software developers and data experts.

Changing VS.NET defaults

Hello,

When you add a new web form in VS.NET it
automatically adds the following namespaces at the top:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

is there a way to make it so that VS.NET also
automatically includes

using System.Data.SqlClient;

? Thanks!
Nov 17 '05 #1
5 1596
Right click on the project in "Solution Explorer". Select Properties. Then
go to the "Imports" tab, and add system.data.sqlclient.

"Mark Fox" <in**@solelsoftware.com> wrote in message
news:0d****************************@phx.gbl...
Hello,

When you add a new web form in VS.NET it
automatically adds the following namespaces at the top:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

is there a way to make it so that VS.NET also
automatically includes

using System.Data.SqlClient;

? Thanks!

Nov 17 '05 #2
Never mind. This option is only available for VB projects. In C#, it is on
the same dialog, on the left side, select the "Common Properties" folder,
and then select "References Path".

I'm using VS 2002

"George Ter-Saakov" <we@hotmail.com> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
What version of VS are you using?
I can not find this tab in my VS 2003. Version 7.1.3088

Thanks,
George.
"Mark Heimonen" <ma***@adiaim.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
Right click on the project in "Solution Explorer". Select Properties.

Then
go to the "Imports" tab, and add system.data.sqlclient.

"Mark Fox" <in**@solelsoftware.com> wrote in message
news:0d****************************@phx.gbl...
Hello,

When you add a new web form in VS.NET it
automatically adds the following namespaces at the top:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

is there a way to make it so that VS.NET also
automatically includes

using System.Data.SqlClient;

? Thanks!



Nov 17 '05 #3
Thanks.
But I probably misunderstood. I thought it would add automatically using
directives to the source.

George.

"Mark Heimonen" <ma***@adiaim.com> wrote in message
news:uT**************@TK2MSFTNGP12.phx.gbl...
Never mind. This option is only available for VB projects. In C#, it is on the same dialog, on the left side, select the "Common Properties" folder,
and then select "References Path".

I'm using VS 2002

"George Ter-Saakov" <we@hotmail.com> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
What version of VS are you using?
I can not find this tab in my VS 2003. Version 7.1.3088

Thanks,
George.
"Mark Heimonen" <ma***@adiaim.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
Right click on the project in "Solution Explorer". Select Properties.

Then
go to the "Imports" tab, and add system.data.sqlclient.

"Mark Fox" <in**@solelsoftware.com> wrote in message
news:0d****************************@phx.gbl...
> Hello,
>
> When you add a new web form in VS.NET it
> automatically adds the following namespaces at the top:
>
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Data;
> using System.Drawing;
> using System.Web;
> using System.Web.SessionState;
> using System.Web.UI;
> using System.Web.UI.WebControls;
> using System.Web.UI.HtmlControls;
>
> is there a way to make it so that VS.NET also
> automatically includes
>
> using System.Data.SqlClient;
>
> ? Thanks!



Nov 17 '05 #4
Sorry, I guess C# doesn't have the same ability on this dialog. In VB.NET,
it doesn't actually add the statements, but it uses the imports when
compiling your project.

"George Ter-Saakov" <we@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Thanks.
But I probably misunderstood. I thought it would add automatically using
directives to the source.

George.

"Mark Heimonen" <ma***@adiaim.com> wrote in message
news:uT**************@TK2MSFTNGP12.phx.gbl...
Never mind. This option is only available for VB projects. In C#, it is
on
the same dialog, on the left side, select the "Common Properties"

folder, and then select "References Path".

I'm using VS 2002

"George Ter-Saakov" <we@hotmail.com> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
What version of VS are you using?
I can not find this tab in my VS 2003. Version 7.1.3088

Thanks,
George.
"Mark Heimonen" <ma***@adiaim.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
> Right click on the project in "Solution Explorer". Select Properties. Then
> go to the "Imports" tab, and add system.data.sqlclient.
>
> "Mark Fox" <in**@solelsoftware.com> wrote in message
> news:0d****************************@phx.gbl...
> > Hello,
> >
> > When you add a new web form in VS.NET it
> > automatically adds the following namespaces at the top:
> >
> > using System;
> > using System.Collections;
> > using System.ComponentModel;
> > using System.Data;
> > using System.Drawing;
> > using System.Web;
> > using System.Web.SessionState;
> > using System.Web.UI;
> > using System.Web.UI.WebControls;
> > using System.Web.UI.HtmlControls;
> >
> > is there a way to make it so that VS.NET also
> > automatically includes
> >
> > using System.Data.SqlClient;
> >
> > ? Thanks!
>
>



Nov 17 '05 #5
Hello Mark,

I am glad you have found the right info already. Just a supplement that we could also add files to in this folder to add
template for ourselves.

Thanks very much for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Content-Class: urn:content-classes:message
!From: "Mark Fox" <in**@solelsoftware.com>
!Sender: "Mark Fox" <in**@solelsoftware.com>
!References: <0d****************************@phx.gbl> <uo**************@TK2MSFTNGP09.phx.gbl>
<uv**************@TK2MSFTNGP11.phx.gbl> <uT**************@TK2MSFTNGP12.phx.gbl> <5c6101c35779
$6****************@phx.gbl>
!Subject: Re: Changing VS.NET defaults
!Date: Thu, 31 Jul 2003 08:45:17 -0700
!Lines: 91
!Message-ID: <01****************************@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNXer16fxcY0K+URpir+JQ/7ZuU5g==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163815
!NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Nevermind. I found the template I have to change. It's
!in
!
!C:\Program Files\Microsoft Visual
!Studio .NET\VC#\DesignerTemplates\1033
!
!You could change any of the default templates there.
!
!The VB templates are in
!
!C:\Program Files\Microsoft Visual Studio .NET\Vb7
!\DesignerTemplates
!
!
!>-----Original Message-----
!>Mark,
!>
!> I added System.Data.SqlClient to the references
!>path, but when I went and added a new web form to the
!>project it didn't automatically add it to the using
!>section at the top. Is there a template file somewhere
!>(the analogy to Normal.dot for Word) that I should
!modify
!>to change the default template for new web form files?
!>Thanks for your help?
!>
!>>-----Original Message-----
!>>Never mind. This option is only available for VB
!>projects. In C#, it is on
!>>the same dialog, on the left side, select the "Common
!>Properties" folder,
!>>and then select "References Path".
!>>
!>>I'm using VS 2002
!>>
!>>"George Ter-Saakov" <we@hotmail.com> wrote in message
!>>news:uv**************@TK2MSFTNGP11.phx.gbl...
!>>> What version of VS are you using?
!>>>
!>>>
!>>> I can not find this tab in my VS 2003. Version
!7.1.3088
!>>>
!>>> Thanks,
!>>> George.
!>>>
!>>>
!>>> "Mark Heimonen" <ma***@adiaim.com> wrote in message
!>>> news:uo**************@TK2MSFTNGP09.phx.gbl...
!>>> > Right click on the project in "Solution Explorer".
!>Select Properties.
!>>> Then
!>>> > go to the "Imports" tab, and add
!>system.data.sqlclient.
!>>> >
!>>> > "Mark Fox" <in**@solelsoftware.com> wrote in message
!>>> > news:0d****************************@phx.gbl...
!>>> > > Hello,
!>>> > >
!>>> > > When you add a new web form in VS.NET it
!>>> > > automatically adds the following namespaces at
!the
!>top:
!>>> > >
!>>> > > using System;
!>>> > > using System.Collections;
!>>> > > using System.ComponentModel;
!>>> > > using System.Data;
!>>> > > using System.Drawing;
!>>> > > using System.Web;
!>>> > > using System.Web.SessionState;
!>>> > > using System.Web.UI;
!>>> > > using System.Web.UI.WebControls;
!>>> > > using System.Web.UI.HtmlControls;
!>>> > >
!>>> > > is there a way to make it so that VS.NET also
!>>> > > automatically includes
!>>> > >
!>>> > > using System.Data.SqlClient;
!>>> > >
!>>> > > ? Thanks!
!>>> >
!>>> >
!>>>
!>>>
!>>
!>>
!>>.
!>>
!>.
!>
!
Nov 17 '05 #6

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

Similar topics

2
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
1
by: Brandon Potter | last post by:
Curious if there's a way to change designer defaults in VS.NET 2003; most notably change which font is selected by default for a new Windows Form, etc. Since we're past Windows 3.1 design, the...
10
by: serge | last post by:
I am doing a little research on Google about this topic and I ran into this thread: ...
8
by: btober | last post by:
I'm finding that column defaults are not being assigned to nulls when I do an insert by way of a an ON INSERT rule on a view. For example, the following script \set ON_ERROR_STOP ON \c...
7
by: Jeff | last post by:
Out of curiosity, I tried to check the help file for the property 'Fetch Defaults' to see what it is for. No surprise, it is not mentioned. F1 on the property give nothing. A search of MS knowledge...
0
by: Scott C. | last post by:
We are building a web application that allow's the users to change the defaults of a their pages. Here is a list of what I've done so far 1.) Return the control names, control properties and...
5
by: T. Wong | last post by:
I want to have a single CSS style sheet control the look of my whole asp.net application but I need to set the values in this CSS from code in the start page as the CSS values will be stored in a...
1
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in...
2
by: Olga99 | last post by:
Hi: I am developing Windows Mobile 6 application using Visual Studio and c#. We started developing with AutoScaleDimensions (96F, 96F) and design-time defaults for device resolution 96x96 , now...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.