.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Change the default namespace in VS2010

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

Hi.. i search a lot on net but couldnt found solution so thought to ask here..


i want to change default namespace in VS2010 

When i create asp.net website by default i got this namespaces in the .cs file of webform


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

But i want to add 

System.Data namespace By default whenever i add any new website..

is there any solution?



View Complete Post

More Related Resource Links

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Is it possible to change the title bar background and the font style on default template?



Is there any way to change the default top link /title bar picture and the fonts of the title without breaking anything in the layout/structure?

I have changed the theme to Obsedian and I would also like to change the picture of the title bar of this theme and also the font/style of the title, top link bar, menus..etc. Is there a way to do this?

Please note: I am using WSS 3.0 and I am not the Administrator of the sharepoint. I am only the site admin of some sites on this sharepoint. I can do some basic customization using SPD.

Basically, what I am trying to do is that I want to set up a sharepoint site, however I want to make it NOT look like a sharepoint site.Well I know this is possible, but for my case it might be just partially possible due to the limitation that I am not the Site collection admin and hence I do not have direct access to the server itself.

What I want is to hide most of the sharepoint links/menus/bars, etc and use my own buttons/hyperlinks etc .. for user to navigate on the sites.

Thanks in advance for your help/advices.



How do I change the default HTML code for a collection of lists and views


I have modified the html display code of some lists and content query web parts in SharePoint designer.  This works well when modifying a few lists, but I have many lists and different views with these many lists.

Is there a way to modify the template code for a site so that all my lists, views and CQWPs display identically with my modified code?  Managing these individually is not practical.

VS2010 XAML namespace intellisense not working

When I type in a namespace in XAML, I'm not getting any intellisense. For example: xmlns:local="" In VS2008 I would get a long intellisense list here. In VS2010 I get nothing. I have tried this on 2 different computers. What am I missing?

Change Default Column Value programatically

On a Document Library Settings Page, there is a new setting in SP2010: "Change Default Column Value". Changing the default value of the Field is different from this value. Does anyone know what this value is and where to set it programatically? Also, what libraries is this setting available on? This code updates the field's default value but not the property mentioned above: SPField field = list.Fields["Column"]; field.DefaultValue = "DefaultValue"; field.Update(); Thanks!

Fresh VS2010/SP2010 install. Cannot Deploy default BCS template.

Error ocurred in deployment step 'Add Solution': Failed to load receiver assembly 'Microsoft.Office.SharePoint.ClientExtensions, Version is everyone else getting a BCS template to work  ?If you do SharePoint dev and have MSN add me!! punkouter@hotmail.com We can help each other out. My SharePoint Blog ---> http://punkouter.spaces.live.com/

how can I change default errormessage for invalid price

I have:[Required(ErrorMessage = "Price is required.")]public decimal price { get; set; }How can I change default message for invalid price - I would like to change default error message "The value '45,8asasa' is not valid for Price.".

Change the Default Date in the Date Picker Control

Hi, I have a WPF Datagrid in which one of the columns is a Date Column. So i have used a DataTemplateColumn as Follows     <my:DataGridTemplateColumn CellTemplate="{StaticResource EffDateDateTimePickerControl}"   CellEditingTemplate="{StaticResource addrEffDate}" Header="Effective Date"/> And in my Resource File i have written the following code: Style   TargetType="{x:Type my:Calendar}" x:Key="CalenderControlTemplate">     <Setter Property="Template">     <Setter.Value>     <ControlTemplate TargetType="my:Calendar" >     <my:CalendarItem Name="myCalendarItem"   Background="White"   BorderBrush="Black"   BorderThickness="1"   VerticalAlignment="Center" />     </ControlTemplate>       </Setter.Value>     </Setter>     </Style>       <DataTemplate x:Key="EffDateDateTimePickerControl">     <Label x:Name="lblEffDate" Content="{Binding effectiveDate,Mode=TwoWay}" ></Label>     </DataTemplate>     <DataTemplate x:Ke

Namespace resolution issue when loading activities designed in VS2010 in rehosted WorkflowDesigner

Hi. I have activities that is made in VS2010, that are to be used in a rehosted WorkflowDesigner app. In the rehosted app I have a WorkflowDesigner, a toolbox with all the standard and my custom activities, and a property window. The problem occures when I load a composite activity that has reference to other custom activities (and that is drawn in the designer in VS2010). In the rehosted app the composite activity is shown almost as expected, except that all the referenced activities are shown in the designer as a red error message: "Activity could not be loaded because of errors in the XAML."  If I load the same activity in VS2010 it works.  If I remove the referenced activity in the rehosted app and adds it from the toolbox there, it works. If I draw the composite activity in the rehosted app from "the ground up", it works. If I compare the activity XAML that is saved in VS2010, and the activity XAML when opened, modified and saved in the rehosted app, I find differences in how namespaces are expressed: The Activity-XAML from VS2010 has namespace resolution at the top: xmlns:local="clr-namespace:WCFWorkflowPOC" The Activity-XAML from the rehosted app does not save namespace resolution at the top. If I add the activity in the rehosted app insted of in VS2010, it places namespace resolution

Change background color of default 2010 look?

Hi, I like the default look of the 2010 v4.master.  I was just wondering if it was possible to change just the background color from white to another color (gray in my case)?  Thats really the only change i would like to make.  Thanks!

Handling Type namespace/assembly change during serialization

We needed to move a class from one assembly to another due to referencing issues.  However, we have Workflows in the field where this type is serialized into them and we get the Failed to load type error.  I was wondering if there was anything like AssemblyResolve for handling type load failures where we can correct the type and load the correct one?

how do i change default currency(us dollar) in VB to my local currency

i ve been following the videos (10 in all) posted by beth massi on lightswitch. how do i change the default currency in US dollars to Nigerian Niara (N)

Change Document Library default action on Items



I have a standard Document Library where I uploaded various  kinds of file (.pdf, swf). Whenever I click on an item (or I paste its direct link into the browser) it prompts me to download it instead of opening it into the browser directly (with flash player or acrobrat in my example).

How to obtain the desired behavior? Thanks

How to change the Default Value of the Parameter to "Query Based"


Hi I have a Report which i deployed into my localhost.

In the Report Manager, Report Parameter Properties, I unchecked the HasDefault option for which Default value is coming from some Query.

When I retry to Set the Default Value to Query Based, Its not taking.

Need Help.

Change Default Sort for Dynamic Data Web Application




I just created a dynamic data web application and setup a simple .EDMX file. Next, I created meta-data / partial classes to ensure that my integer identifiers wouldn't show up:

// ...


public object TableId { get; set; }

 // ...

I wanted to now set the up the list pages so they sort using a different attribute ("Name" in this case). Anyone know if this is possible / how to do it?






Change default page ?


In Visual Studio !when I  Run project it will display Default.aspx page, Now I want run project it will display mypage.aspx ! how do I setting it ?

help me !

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend