Visual Studio :: Adding / Customizing Gridview AutoFormat?
Mar 4, 2011
There is currently ready-to-use Gridview's Autoformat Scheme like Colorfulclassic,simple, professional,slate. etc. So is it possible if I wantto add my own Scheme ?
I've searched but does Visual Studio 2008 have a setting for C# where it will autoformat/beautify my code as I write it? There is a setting for VB.NET called "prettify". I've also searched the archives already and found a macro to execute this on save and I know I can drag and drop it onto the toolbar but I want it to work without my doing ANYTHING for both ASPX and CS files.
Is this possible via built-in setting, modification, or available from an add on?
I'm not sure where went wrong, from the beginning, my gridview didn't reflect what I choose in AutoFormat style. I tried to set one of the styles and Apply and OK, the grid rows seems to reflect but header row color remains the same. My gridview has pre-defined columns and I bind it to datatable at code behind. And it is placed inside div tag which is inside a table tag. And this page is a child page inside a master page.
1. Is there a reason why someone would want to add a reference to an assembly (e.g. System.Drawing) but not add the Using statement? Seems that if you add a reference, you should add the Using statement automatically, but maybe not always?
2. Correct me if I'm wrong, the only benefit of adding a "Using" statement at the top of your file, is to bring into scope an assembly and not have to fully type the class name? So if I have a Using System.Drawing, I can type in string = Color.Tomato.ToString(); instead of string = System.Drawing.Color.Tomato.ToString();
I installed pure components several times and when i use add items to the toolbox, it doesn't show anything, and when visual web starts, it shows me an error message (pure components failed to load).... but the components are checked when i add items or choose items, but they don't show up in the toolbox.
i am new to .net field , currently i am using Visual Studio 2005, Sql Server 2005(not express editions). Now while creating a website when i want to add a database through VS 2005 >App_Data>"New Item">Sql Database...i am getting an error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URl: http:go.microsoft.com/fwlink/?linkID=49251"...
secondly if i add a database through Sql Server how it will add in website that i created in VS 2005.
I do not have SQL Express installed as I already have SQL 2008 (Developer) on my Dev machine. When I say add new item -> SQL Database, give it a name and say "yes" to it creating me the app folder I then get the message that I need to have SQL Express installed and I can download it from blah blah.
Why will it not let me use/recognise my installed instance of SQL Server?
My group has been working on Visual Basic Web application for a very long time. Everytime a new Visual Studio Release comes out we upgraded this application to the current release of visual studio and ASP.NET. Right now we have this application working in visual studio 8 and ASP.NET 2.0.
Recently I downloaded the AJAX tool kit to my system.I was successful loading the AJAX tool kit controls to a newly created ASP.NET Web Application and performed some experiments developing Web pages using AJAX.Now I want perform experiments that test the AJAX script manager to this old application. When I clicked on the visual studio 8 project file to this application the AJAX Extenter Controls and the AJX Toolkit controls are not listed in the visual studio toolkit. In fact the Visual Studio Control Tool kit does not show the tabs where the AJAX Extender and AJAX toolkit controls were loaded. I tried to add a new AJAX Extender and AJAX Toolkit Tab Pages to the Visualo Studio web control toolkit but visua studio reports back that the AJAX Extender and AJAX Toolkit tab Pages are loaded. However these tab pages are not displayed in the Visual Studio Tool Kit
To add AJAX Extender and Toolkit tab pages I must click the Choose Items application and press the reset button on the Choose Items Dialog Box. After this action I can add the Ajax Extender and AJAX Toolkit Control Tab Pages to the Visual studio Control Toolkit. However I cannot add AJAX Extender controls found in the System.Web.Ajax.dll file into the toolkit. After I select the System.Web.Ajax.dll file and press the choose Item OK button none of the controls foun in the System.Web.Ajax.dll file. Same is true with the controls found in the AJAXControlToolkit.dll file too
My objective is to include a JavaScript file in my Custom Server Control, because it's a bit tedious writing all the JS in C#. I've done a lot of searching and most resources seem to say that I need to add the file as an embedded resource, and access that. I found a few pages describing how to do this:
[URL]
They all seem to say I need to, after adding the JS file, change the build action to 'embedded resource' through its properties. However, the only properties I can actually see on the file are 'File Name' and 'File Path'. Right clicking the file in the solution explorer doesn't allow me access to properties, and right clicking (as one of those links suggests) anywhere else doesn't expose it either. I tried looking through VS Options but couldn't find anything, although I get the impression that I have something configured wrong that's not allowing me to see as many properties as I should be able to.
I'm working on the following aspx file, and for some reason VS2010 is messing with my code. I have no idea why, and was hoping one of you could have a look at it.
What happens is that most of the times when I hit ctrl+s, it add some code to the end of the file.
i have a project which runs fine when I build it and run it. But when I add an web deployment project to the same, it throws out a "server block is not well formed" error in Default.aspx page
through googling i found out that it may have something to do with page/server directives. but i cant figue out what is wrong with this code.
I'm trying to migrate an old asp.net 1.1 application to target the new .net 4.0 framework. There are good guides available on this [URL]. However, all approaches start with the assumption that the 1.1 project contains a solution file which one has to open using VS 2010 and go through the conversion wizard.
In my case, the project does not have any solution file, giving me a sort of chicken and egg issue.
Is there a way to add a 1.1 .net soution file with or without VS 2010? Using command line tools? What is so special about a solution file anyway?
A while ago when i started using VS 2005, i found that some assembly entries were automatically added to from web.config
and i was getting annoying errors. later i found i have added unneccessary references in my application. And its a feature that assembly reference are automatically added to assembly tag in Web.config, So dev don't have to worry about it.
Recently i used Interop.OWC11.dll in my application. And ^&*# got the annoying
"CS0234: The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"
error again.. Assembly entry was not added automatically. I checked same for existing references in my application, for them to automatic entries is not happening.... ? :(
I have to write is down in Web.config manually... I don't understand why?....
I have a vs 2008 project that I converted to vs 2010. I added a label to my aspx page but I couldn't get it be recognized in the c sharp until I realized that it wasn't added to the designer.cs file. I added it to that file like this:
[Code]....
and it worked fine. Why would I have to add something to the designer.cs file though? Shouldn't this have been created automatically when I built the project?
I have an MVC 2 web application which uses models auto-generated by LINQ. When I add a Silverlight project to my solution, generating a new strongly-typed View fails with the message:
Compiling transformation: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?). I understand this is most likely because Silverlight does not access the System.Data namespace (at least, I can't add the reference to my Silverlight app). However, it's not really important - I'm just trying to generate an .aspx View at this stage, not a Silverlight View.
Is there any way to get this template generation to work, or do I have to create my Silverlight project outside the solution and build it separately? I was kind of hoping to take advtage of WCF RIA and some of the other goodies one gets from including the Silverlight app within the main solution... anybody got a fix?
I wonder if this is either a bug or a setting I could potentially change.
I uploaded a YouTube video of the behavior since it's easier to see: [URL]
I've got a Multiview control with a View (call it view1) inside it. When I type text into view1 within the Design view of Visual Studio 2010, if the text reaches the end of the visible line it does not wrap to the next line as expected (like a div or p tag would do outside the multiview control). Instead, it extends the multiview horizonally and the horizonal scrollbar appears.