.net

How can I grab each page of text in a Word doc separately (using .NET)?

I need to determine which pages of a Word document that a keyword occurs on. I have some tools that can get me the text of the document, but nothing that tells me which pages the text occurs on. Does anyone have a good starting place for me? I'm using .NET Thanks! edit: Additional constraint: I can't use any of the Interop stuff. e...

Why would someone use Button instead of LinkButton control in navigation.

I am reworking some ui in an application written by freelance .Net developers from another country. I am not going to go into how bad the code is and entangled the code with structure content and presentation are... But one of the things I notice is that menu for accessing the parts of the app is made with Button controls that post ...

Read-only Access data source

We have a major VB6 trading application which uses MS Access (Don't ask!) It is always blasting trades into an MS Access database. The rest of the infrastructure here has moved on considerably and I want to read this Access database periodically and copy any new trades into a SQL server database. The SQL and C# needed to do this is tri...

Does VB.NET optimize the concatenation of string literals?

Similar to this question, but for VB.NET since I learned this is a language thing. For instance, would the compiler know to translate Dim s As String = "test " + "this " + "function" to Dim s As String = "test this function" and thus avoid the performance hit with the string concatenation? ...

control lost focus event when using keyboard shortcut

For both .NET Winforms and Windows Presentation Foundation, if I have a text box that the user has just entered text into, and a button, if the user clicks the button the "LostFocus" event fires before the button click event fires. However if the user uses a keyboard shortcut for the button (e.g. Button's text is "&Button" or "_Button" ...

Where the deploy files goes for .NET Web Service running inside Visual Studio?

When I use my browser to test my web service, it opens at http://localhost:4832/ -- where can I find its files physically on my drive? Update I do not want to know where the files of my VS.NET solution are located but where I should put the files of the web service... the .asmx, .dll and other files that I will install for the real web...

Fastest way to hash a set of GUIDs

I have a list of n GUIDs and I need to hash them into a single value. This value could be the size of a Guid object or the size of an Int32, it doesn't really matter, but it does need to be statistically unique (say with a probably similar to MD5). So one approach could be to sort them, concatenate the bytes and take an MD5 hash of all...

How do you monitor file access and changes on a file server by user name?

I was asked to find a way to monitor changes (modification, renaming, deletion, moving) of files in specific folders on the company's shared file server (simple windows shared directory). I wrote a simple app in C# that uses FileSystemWatcher to monitor these changes and notify a particular email address of them. What I'd like to know n...

How to get rid of View State completely in .NET

How can I get rid of: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="..."/> Completely ! ...

WMI event when machine comes online

Is there a WMI event you can subscribe to that will fire when a remote machine boots up and comes online, or goes offline? My application needs to be able to monitor machines for their availability, and ideally, I'd like something that can work via events instead of continuous polling. ...

Is Memcached interchangeable with ASP.NET State Server?

Hi, I use ASP.NET and WCF services in a load balanced web server environment, using Memcached in the service layer. I also wanted to replace the use of ASP.NET State Server (for Session State) with Memcached. Now I am afraid it is not a good thing, because from what i understand, Memcached is a cache server rather than a state server, ...

Windows Forms Error: "A strongly-named assembly is required"

I have a Windows forms project (VS 2005, .net 2.0). The solution has references to 9 projects. Everything works and compiles fine on one of my computers. When I move it to a second computer, 8 out of the 9 project compile with no problem. When I try to compile the 9th project (the main project for the application - produces the .exe file...

invalid QName when transforming a .net XSLTransform

I have a piece of XML that is structured similar to this: <root> <score name="Exam 1"><value>76</value></score> <score name="Exam 2"><value>87</value</score> </root> and I would like to transform it to look like this: <root> <Exam 1>76</Exam 1> <Exam 2>87</Exam 2> </root> Following this article I am using ...

Does .NET 3.5 installer include 3.0 SP2?

We're trying to track down some .Net assembly dependency problems. On Windows XP, does the .Net 3.5 installer include 3.0 SP2 automatically? ...

CompareValidator inside an UpdatePanel - VS2008

I'm using an UpdatePanel and want to put a CompareValidator on two text boxes, to verify that the user-entered password and confirmation are the same. This is working fine (I have VS2008 and am using .NET 3.5) out of the box, with one minor problem: The validation is firing as soon as the user clicks out of the first textbox, before th...

Should I learn a .NET Language?

I hate to be subjective in this way, but with many people calling this website a .NET oriented website it's probably the best place to target this question at. In the current climate, should I, a simple beginning programmer, learn a .NET language? Obviously the most popular languages/frameworks around at the moment are ASP.NET (I know i...

does silverlight support remoting?

Does silverlight support the remoting functionality of the .net framework? ...

TAPI Versioning

What is the best way to get the TAPI version and additional TAPI information with C#? ...

Mark parameters as NOT nullable in C#/.NET?

Is there a simple attribute or data contract that I can assign to a function parameter that prevents null from being passed in C#/.NET? Ideally this would also check at compile time to make sure the literal null isn't being used anywhere for it and at run-time throw ArgumentNullException. Currently I write something like ... if (null ...

Walking an XML tree in C#

I'm new to .net and c#, so I want to make sure i'm using the right tool for the job. The XML i'm receiving is a description of a directory tree on another machine, so it go many levels deep. What I need to do now is to take the XML and create a structure of objects (custom classes) and populate them with info from the XML input, like Fi...