visual-studio-2008

Use of Print Preview in .Net Winforms

余生长醉 提交于 2019-12-22 00:46:26
问题 I am writing c# code in .Net 2008 Winforms. I created a print preview window to create a report. It works fine I can preview the report and then print it. The only problem is it is not as flexible as the Office Print preview. The users cannot chose a printer other that the default printer and they cannot limit the print to certain pages. Perhaps I am missing some prperties I need. Here is a portion of the code I use: PrintDocument pd = new PrintDocument(); pd.PrintPage += new

How can I identify whether an ASP.NET site is being run “normally” or in “debug” via Visual Studio?

人盡茶涼 提交于 2019-12-22 00:28:11
问题 How can I determine what 'mode' my site is running under? In this specific case, I have code in the code-behind pages that should act one way in 'release' mode - that is someone navigating there with a browser, and another way if I'm in debug mode coming from VS2008. (These are things like identifying which SQL connect string to use, whether or not to display certain error or warning messages, etc) VS2008 is configured to go through IIS for a variety of reasons (Cassini is not an option).

tab control, vertically aligned tabs with vertically aligned text

六眼飞鱼酱① 提交于 2019-12-22 00:08:55
问题 I want to use a tab control and have the tabs displayed on the left, as opposed to at the top. I have set the alignment to the left and the tabs are displayed there. However, how do I get the text to be displayed on the tab, vertically? I have looked at the msdn and it gives an example of a left aligned tab control but the tab label is still displayed horisontally! The other thing, does anybody know how to use the tab control with left aligned tabs with the default layout so that it looks

why my WebClient upload file code hangs?

孤街醉人 提交于 2019-12-21 23:35:13
问题 I am using VSTS 2008 + C# + .Net 3.5 + ASP.Net + IIS 7.0 to develop a Windows Forms application at client side to upload a file, and at server side I receive this file using an aspx file. I find my client side application will hang after click the button to trigger upload event. Any ideas what is wrong and how to solve? Thanks! Client side code, public partial class Form1 : Form { private static WebClient client = new WebClient(); private static ManualResetEvent uploadLock = new

SQL Server communication protocol issue

泄露秘密 提交于 2019-12-21 22:55:34
问题 I am using VSTS 2008 + C# + ADO.Net + SQL Server 2008. My questions about what kinds of communication protocols SQL Server 2008 will be using, more details of my questions, If the connection string looks like this, whether Named Pipe or TCP/IP is used? Will different communication protocol being used dependent on whether client and SQL Server on the same machine? Data Source=labtest1;Initial Catalog=CustomerDB;Trusted_Connection=true;Asynchronous In SQL Server Configuration Manager, there are

How can I embed an configuration-specific manifest file in my c# app?

限于喜欢 提交于 2019-12-21 20:58:02
问题 I'd like to embed a platform-specific manifest file in my C# app. Is there an easy way to do this in Visual Studio 2008 without using some external script called after the build is finished? In creating a C# app, the configuration and platform dropdowns are disabled for the Application tab, preventing me from selecting an architecture or configuration specific manifest to embed to that app. I'm forced to use one manifest for the whole application. I thought of using a Post Build event to call

Can't “Attach to Process” to debug using Nsight in Visual Studio 2008

可紊 提交于 2019-12-21 20:57:34
问题 I'm trying to debug a cuda application using Nsight with Visual Studio 2008, so I opened the Attach to Process dialog. I set the Transport to be Nsight GPU Debugger. I set the Qualifier to the name of my machine (MONAD in this case). I see a list of processes in the Available Processes widget, but they are all greyed out, and if I click on my application, it remains greyed out and I cannot click the attach button. When I built the application I made sure to use the -G0 flag when compiling my

The type or namespace name 'ProfileCommon' could not be found

妖精的绣舞 提交于 2019-12-21 20:19:25
问题 Gooday, I'm creating an ASP.NET with C# Website in Visual Studio. I used ProfileCommon and stumbled upon this error: The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?) Hope it has a quick fix? What directive should I include? Thanks a lot. EDIT: Any advice? - After I installed this add-in: http://archive.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980 Error 1 The "BuildWebProfile" task

Visual Studio ASP .Net MVC Intellisense

≡放荡痞女 提交于 2019-12-21 17:01:56
问题 the vs 2008 intellisense doesn't work if i use it inside html attribute. example <form method="post" action="<%= Url.Action %>" while i'm typing Url.Action the code hint doesn't work, instead it gave me options of files that can be used for the "action" value. Is it normal that the intellisense doesn't work inside html attribute? or am'i missing something to fix this bug. 回答1: I think it's just that way for now. I have the same 'issue' but got used to it. Tip: If I need Intellisense, I just

Installing nUnit with ASP.Net MVC 1.0

北城余情 提交于 2019-12-21 15:39:25
问题 Does anyone have any advice/information on how to install nUnit with ASP.Net MVC? I have seen previous posts which related to the preview releases and involved a ghoulish nightmare of having to create template files, run command prompt and even mess with the registry. Obviously this is far from ideal and given Microsoft's intention to allow any testing framework I was hoping that it was a much improved process in the full release. Googling seems to return results from when MVC was in the