.net

What are the conceptual changes that came from C to .net

5-6 years ago when i was in school, I had C as my programming language. And at that time, I read about struct and little bit about Classes. At that time I had a concept that under struct we cannot declare functions and other such things. Structure only allows value types and themself are also value types. And I was living under that s...

Sharepoint Web Services Item Data (access to "Created By" Column)

I am currently working on an application that displays the data of a Sharepoint calendar via Sharepoint Webservices. Therefore, I am using the List Service of the calendar. I manage to get all important information except user data, such as Created By or Modified By. The XML which is returned contains the following: <rs:data ItemCount=...

How to read and write excel data through .net

Hi, Can anybody send me the code sample to read one excel file and write the content of the excel file to another excel file. It is very urgent. Please help me on the same. ...

TWAIN blocks when user cancels

I'm using a slightly modified version of Twain Dot Net in my scanning application. The problem is, when the user cancels scanning using a button on the scanner (or if paper jams), TWAIN should show an error message and return with some failure code. But instead, what happens is that the call to DG_IMAGE / DAT_IMAGENATIVEXFER / MSG_GET r...

System.Data.OleDb.OleDbConnectionInternal..ctor: Unspecified error

After several hours (~6 hours Win7 64bit, ~24hours WinXP) of running multi-threaded (.NET Framework 3.5 SP1 WinForms) desktop application using .mdb files as backend I'm getting the following runtime error: Exception -> Unspecified error StackTrace -> at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionS...

Most efficent way to merge data into SQL Server database from ODBC source

I need to constantly merge (upsert/delete) data from an ODBC data source to a SQL Server 2008 database (number of rows vary from one row to 100000 of rows) What would you recommend as the most efficient approach (using .net 3.5 ): Use SqlBulkCopy into temp table then call stored procedure with Merge command using temp table as sour...

web.config: Changing an application setting with C#

How can I change an application setting within a web.copnfig programmatically with C# (from another application, which configures the web-application)? The following code snipped doesn't work, because AppSettings[...] is readonly! configuration = WebConfigurationManager.OpenWebConfiguration(...); ConfigurationSectionGroup configuration...

How to see list of possible exception in some Class.(C#.NET)

Hello. I have a lot of classes that have been written in C#.NET, and I need to know what exceptions can be thrown by them. How I can do it in Visual Studio 2005. ...

Allow blanket permissions for ASP.NET worker processes from any machine

Hi, Working on an application which has some areas locked down using standard .net authorization through web.config i.e. <location path="MySite/MyPrivateFolder"> <system.web> <authorization> <deny users="?"/> </authorization> </system.web> </location> However I need pages from this location to be accessible by the ASP.NET wor...

Using object property for a key in dictionary

Hi I would like to use an objects property as the key for a dictionary. Can this be done? The ultimate goal for this is to use this so can see if the property is locked or not, in various states that an object can be in. These locked value is not persisted, just exist in the business rules for the model. Ideal code to see if field is ...

Parsing and replacing special characters from file

I have the following text in a file... blah blah ñ blah Notice the ñ symbol. I'm reading this with StreamReader.ReadLine and then trying a string.Replace to replace the special character. For some reason this isn't working, and it seems to be something to do with the StreamReader. When I inspect the string in the debugger after read...

Which passwordchar shows a black dot in a winforms textbox?

Short question here: In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common black dot as a character? Is there perhaps some font I can use that has this as a character? If I use 'UseSystemPasswordChar = true' it shows an asterisk (*). ...

Problem launching a System.Diagnostics.Process under Windows 7

I’m trying to launch an application (Operating System, My Application and the application I want to launch are all 32 bits), from .NET 3.51. The code that launches the Process is used for other applications, but there’s one that is giving us a headache. If we “double click” on the application’s icon, it works as expected, meaning that i...

Reverse tracking a XMLNode from a Treeview Nod

Hello I have assigned a XMLNodeList and its child nodes collection to a Treeview.. I get to see all the data on the treeview.. Now i select a treeview node item. I now want to get the XMLNode associated with it. Basically i want the conversion from a TreeNode ---> XMLNode Is this possible ? ...

Difference between ASP.Net, C#.Net and VB.Net?

Hey, I just need clarification about something. I am currently job hunting - I put my CV on Monster on Monday and have had about 8 agencies phone up about jobs they have available. One of them said that he notices VB.Net is on my CV but asked if I know ASP.Net. I replied that ASP.Net encompasses both VB.Net and C#.Net - as far as I kno...

vb.net handle a post with an array

Hello All, I'm trying read an array that was post from a html form <input name="test[]" id="1" type="checkbox" value="1" /> <input name="test[]" id="2" type="checkbox" value="2" /> <input name="test[]" id="3" type="checkbox" value="3" /> <input name="test[]" id="4" type="checkbox" value="4" /> In php I know you can just access the da...

Stateless ORM for SOA

Hi, We need to implement a .NET WCF service that will be a part of a SOA solution, which means it's entities will pass through and be changed by both Java & .NET based services, and also on Desktop clients (though they will probably be .NET, but it shouldn't matter). In order to achieve this flexibility, all objects have to be stateles...

How to remove trailing characters after a blank space, c#

I've a string '12/10/2010 00:00:00' I need to show this as ''12/10/2010' using c#. Help appreciated ...

How much web layer input (ex. GridView DataKeys) should be validated in the business layer?

Back in the day when we were mostly submitting forms from one page to another we used to have to validate all post parameters to make sure that the ids somehow belonged to the user that was currently logged in. After all you didn't want a "hacker" to be able to pull someone else's information. In modern ASP.NET application in a situati...

ASP.NET to WCF serialization issue(?)

so, I've got something like this: there's an ASP.NET application (1) that references WCF service (2) that references .NET application (3). (1) creates query gives it to (2), (2) gets some info from (3), processes it and returns it back to the (1). And here's the issue - there's DataContract class for request (that is used by both (2) an...