.net-3.5

System.Diagnostics.Process.Start("http://google.com") crashes IE

Okay I'm having a brain fart here. This should be simple, but I'm missing something. I've got a win form and I'm trying to launch a web page when I click a button. The code for the button is here: private void button2_Click(object sender, EventArgs e) { try { System.Diagnostics.Process.Start("http://www...

Link Helper Class in ASP.Net MVC; Where is the URL-Encode?

To get the URL's I wanted i created a simple Link Creator helper for my search results. But it wont let me use server urlencode in it and some of the details passed are French/Czech/Swedish words commas and apostrophes; Is there a quick function that will strip all this garbage out before hand? ...

How do I store a hash with the search results?

I'm pulling 500 results from a search query to a webservice; I store these in the session for that user so pagnation doesnt cause further calls. What I want to do is stick the parameters together into one long string and hash them so I have a quick hash to check against. in php this would look something like... <?php $_SESSION["shash"...

HttpWebRequest has no close method?

I am very surprised to see HttpWebRequest has no close method, but its counter-part HttpWebResponse has. It makes me a little bit confused and inconvenient. :-) So, we only need to call Close on response and no need to treat with request? My concern is about leaks and better resource usage efficiency. I am using VSTS2008 + C# + .Net 3.5...

Write to app.config in .Net 3.5??

I need to be able to write to the app.config file in my .Net 3.5 Windows app to store some system settings? I can read from the file but I can't write to it?? Everything I have found is for 2.0 and doesn't look to be the same for 3.5. ...

Saving drop down settings for Windows Application??

I have a .Net 3.5 windows application with various drop down lists! I want to be able save the choices the user has selected in the drop downs??? I had tried setting ApplicationSettings PropertBinding but this didn't work! is there something else I have to do? I was unable to select anything other that the first item in a drop down whe...

ASP.NET : database independent data accses layer

I would like to develop a database independent data access layer for my web application.This data access layer should communicate with any external(as far as my application is concerned) databases like Ms SQL server,Oracle,Access etc... (as per the user's preference) .I will provide various options-various databases like SQL server,Acces...

Having problem in puting JavaScript Menu into Asp.Net page

Hello everybody. Before I post my problem here, please be noted that i would really like to leave javascript and css for that menu as it is. Now to my problem. I have a menu in JavaScript that I am having a problem putting into asp.net page, I am having problem to produce the proper html to be more correct. I would really appreciate i...

Why isn't my exception being caught

I have an application that is mixed Winforms and WPF. In Winforms, I have a global exception handler that is defined as follows: AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.ThreadException += Application_ThreadException; This ALWAYS catches exceptions anywhere in my application that occu...

Load a System.IO.FileStream using a WildCard

I am trying to load a file that I know part of the name (and know that it will be uniquely identified by the part that I know.) Here is the jist of it: string fileName = ID + " - " + Env + " - "; byte[] buffer; using (FileStream fileStream = new FileStream(Server.MapPath("~") + fileName + "*", FileMode.Open)) { using (BinaryRead...

how i can create workflow at runtime in .Net

I m using .Net framework 3.5, VS IDE to work with windows application. I have requirement to Create State machine Workflow at runtime. That is, I need to define my states, Activities n target state in one windows form n based on dat i need to create entire workflow at runtime.... i require persistence and tracking too for the same...can ...

How to find matching URLs except for certain query strings?

I am using the URL for an HTTP resource as unique identifiers for the resources (surprise). These are all different: http://localhost/Docs/SomeDocument?group=33&amp;checksafety=true http://localhost/Docs/SomeDocument?group=11&amp;checksafety=true http://localhost/Docs/SomeDocument?group=11&amp;checksafety=false However, I have a thir...

Silverlight: Poor perf. using DataGrid with RowDetailTemplate

Hello, I have a DataGrid with about 4000 rows. Scrolling through the DataGrid works well, until I add a RowDetailsTemplate (which is a UserControl that I created). My guess is that my UserControl is being created as the DataGridRows come into view, causing incredibly slow scrolling. Does anyone know of a way to prevent any initializa...

Why won't InstallShield 2009 detect .NET 3.5 SP 1?

On Windows Server 2003 Standard Edition, a customer installed .NET 3.5 SP 1. Whenever we run our installer built with InstallShield 2009, the installer complains that the target machine does not have the .NET 3.5 SP 1 dependency. The customer has uninstalled and reinstalled .NET 3.5 SP 1 a couple of times, rebooting each time, but our in...

Upgraded .net webapp can't open connection to database

I have an old .net 1.0 webapp that needs a bit of maintenance done on it. I've used the auto-upgrader to upgrade it to .net 3.5 (and also later tried 2.0) but now it can't connect to the database. On the surface this looks like a noob connection-string problem, but I'm thinking it's more likely to be related to some subtle problem from ...

Linq to Sql Force Order By

Is there a way in Linq to Sql (.net 3.5) to specify that when you get the children of a particular record, to force the list of children to come back in a specific order? For example, I have a list that has a "DisplayOrder" on it. When I ask my parent record/object for it's property that returns to me this list, I want Linq to Sql to r...

How to publish a web app that is using Enterprise Library for logging?

I'm building a web app and want to enable logging/error tracking. After reading the old question here, I choose Enterprise Library because I like the flexibility of handling various events/exceptions differently. It was simple to setup and install. But, I am not sure how to publish the web application. Specifically... since the loggin...

How to avoid user interruption when deploying a website on IIS 6.0/.NET 3.5

We deploy our websites as a single MSI package. We deploy to IIS 6.0 (Windows 2003) and they run on .NET 3.5. The problem I have is that when we upgrade to a new version of our websites, users may be half way with a long-running task. What I need is the following: How to stop users from starting new requests Let users with long-running...

Generic classes with shared static fields in C#

I have a generic class definition similar to this: public sealed class MyClass<TProperty,TOwner> { ... } Now I'd like any instances of MyClass<TProperty,TOwner> regardless of the types of TProperty or TOwner to share a Hashtable. I thought of creating an internal MyClassBase with a protected internal static field of type Hashtable...

ASP.NET : Best approach for data transfer from remote database to locl database

Guys , this is something like a decision making question I am in a scenario where i want to work with many databases.Some are in my project and some are external.My application would transfer data from the external database(one which reside in a remote machine.I know the ip and user credentials) to my temp database.I want to create the ...