.net

asp:SqlDataSource to DataSet Items

Hi, I have an asp:SqlDataSource ID="SqlDataSource1" tool on my aspx page, what I want to do in the c# sharp code behind is transfer the records returned by the datasource and put them into a DataSet, so that I can add paging to my page, how do I do that, my attempts so far have failed?! My attempts so far have been along the lines of: ...

How can I customize WCF client code generation?

Are there any tools or code generation templates that will let me customize and extend the WCF cliend proxies? It's not that svcutil is horribly broken, but rather I'd like to be able to generatate additional code based on the service contract, not just be limited the svcutil output. ...

How do I add .Net controls to a vb6 application dynamically.

I work on an application which is extendable using VBScript. I have access to the VB6 form and can add controls and reference other controls on the form. I am also able to launch .Net forms via interop. What I would like to be able to do is to create a reference to a .Net component and hand it a reference to a VB6 Frame or SSTab and t...

Good or Bad experiences with CryptoLicensing?

I'm planning to buy CryptoLicensing but before buying it I'd like to get some feedbacks if anyone tried it before. Also it'd be interesting if anyone cracked it or spotted an easy hack against it. I've seen some other SO questions regarding the choosing a .NET licensing component but if you currently happy with another component it'd be...

Dealing with multiple login systems (Facebook Connect, Google Account, and others)

If you want to allow your site users to be able to login with Facebook Connect, Google Account, etc, how do you design your database so that they are all integrated? ...

.NET XmlReader with 'FOR XML' data

Recently, in company we got some MSSQL database from some old project which we have to integrate in current solution. Database has about 100-150 stored procedures that use FOR XML AUTO clause, so that queries return complete object-graph as XML instead of rows. Quickest solution (for us in company) was to create serializable classes (w...

How do I create add a shortcut (.lnk) for my application to the Startup folder programatically in .NET/C#

My application will have a per machine (not per user) Startup shortcut. I can create a shortcut during the installer process no problem. My problem comes when the user later removes it and then tries to re-enable. In otherwords, they turn off RunOnStartup (which deletes the Startup ink) and at a later time they decide they do want it ...

Carriage return in text area

I have to allow the user to enter carriage returns in text areas; something like: Sentence 1 Sentence 2 ... I have to persist those carriage returns when loading and saving data. I use jQuery on the client side, and .NET on the server. Any suggestions on how to approach? Thanks. ...

Will .Net Garbage Collect an object that's not referenced, but has a thread that's doing work?

I have the following code (cut down for readability): Main Class: public StartProcess() { Thinker th = new Thinker(); th.DoneThinking += new Thinker.ProcessingFinished(ThinkerFinished); th.StartThinking(); } void ThinkerFinished() { Console.WriteLine("Thinker finished"); } Thinker Class: public class Thinker { p...

How to (xml) serialize a uri

I have a class I've marked as Serializable, with a Uri property. How can I get the Uri to serialize/Deserialize without making the property of type string? ...

How to check license validation for N computers

Hi. i am developing a software (Desktop based app in C#) which will be run in client server environment. Separate license file will be generated for each user and it will be checked on application startup. there is a requirement that it should also work in network environment. there should be no multiple license files for each compute...

Is MSMQ a good idea

System A captures X information from users via UI. This information is validated and persisted in a database. The user can change, add or delete the information. I have to keep this X information is sync with System B using web service. Also I need to send this information as soon as possible after its persisted in the database. I thoug...

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154.

I developed a Windows service using C#.NET to generate PDF report. To generate PDF file I am using a third party dll. The application is running in my Windows XP platform. When I deployed the service in Windows Server 2008 64 bit version, I got this error: Retrieving the COM class factory for component with CLSID {46521B1F-0A5B-...

Is it possible to pass command-line arguments to an executable via an associated file?

I have a program that passes command-line arguments to an associated file (i.e. associated file extension) of an executable. The executable never receives the arguments. However, if I start the executable directly and pass it both the path to the associated file and the arguments, then it receives both the file path and the arguments. ...

Active Caption Text Color — detect change (in .Net)

On Vista, with Aero enabled, the window in normal mode looks like this: But maximized it looks like: Notice that in normal mode the caption is black and when the window is maximized it is white. How can I determine the current color of the window title ? P.S. I wrote a program to watch after SystemColors.ActiveCaptionTextColor, b...

How to set column header text for spesific column in Datagridview C#

Hi, How to set column header text for specific column in Datagridview C# ...

Web service .NET Framework problem

We are connecting a webservice (java) from C# (VS.Net 2003) application. Web service running on HTTP 1.0 protocol. On the other hand VS.Net 2003 trying to reach with HTTP 1.1 protocol. Therefore objects are coming null value. For example we are getting string[5] object is correctly but array's items are null value. We have to take HT...

How to automatically generate a sports league schedule

I'll start of by saying that I understand that this topic is complicated and that there probably isn't an easy answer. If it were easy then everybody would be doing it. That being said... I've been asked to build an application to manage a sports league. Most of the concepts are fairly easy to understand except for this one: How to gene...

Is the .NET Framework installed by default on Vista?

I'm writing a console application that will be deployed with an installation of an application we are writing. The console app aims to fix a bug in vista that will allow our application to be installed correctly in Vista. The console application works fine, but can I count on the .NET framework being installed on all Vista machines - i...

MCRYPT in .Net

I have a PHP decryption algorithm at one end, and a .Net encryption algorithm at another. I am using mcrypt_decrypt for decrypt purpose in PHP code, and looking for an equivalent of mcrypt_encrypt in .Net. More specifically, the PHP code that I want to convert to .Net is the following: $cipher_alg = MCRYPT_RIJNDAEL_128; $iv = mcrypt_cre...