.net

Starting process from Web Application

Hi, I am actually trying to start a process for winzip and zip a folder. This i am doing using the below code in vb. Dim startInfo As New System.Diagnostics.ProcessStartInfo Dim pStart As New System.Diagnostics.Process Dim tempFileName As String Try startInfo = New System.Diagnostics.ProcessStartInfo( _ "c:\Program Files\WinZip...

How long before the line of business app in F# becomes the norm?

With the recent news about F# being included with Visual Studio 2010, I got to thinking ... how soon before I see functional programming take hold in the usual "line of business app" space? ...

What values to return for S_OK or E_FAIL from c# .net code?

I'm implementing a COM interface that should return int values either S_OK or E_FAIL. I'm ok returning S_OK as I get that back from another call (Marshal.QueryInterface), but if I want to return a failure value what actual value do I use for E_FAIL? (It's such a basic fundamental question that it's hard to find an answer to) Assuming i...

Is it possible to get a lazy IEnumerable from an NHibernate query using ICriteria?

I'm working with NHibernate and need to retrieve and process up to 2 million rows. Ideally, I could process each row - one at a time - without NHibernate loading all 2 million in memory at once (because, you know, that hurts). I'd prefer to get an IEnumerable which would call the data reader iteratively for each read so I could proce...

Circular Reference

I'm looking for a good pattern to resolve the following circular reference in a Windows Form application: Assembly 1 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 2 Assembly 2 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 1 The menu has generally the same i...

Grouping rows of a datatable in VB asp.net 2.0

Hello, As the name suggests I am trying to group rows in a datatable. To go into further detail this table has identical rows except for one field(column). Basically what I am trying to do is put all the different fields of the identical rows and put them in single field whilst deleting the other rows. Here is the syntax that I am curr...

How May I Capture the Screen in a Bitmap?

Hi! I want to print the screen (not with the printer) I want to print it like the 'print button' on the keyboard and get an image. Any idea? I did have no starting point :( ...

Linq to SQL - "This member is defined more than once" error.

I have the following linq code... CMSDataContext dc = new CMSDataContext(); var q = from u in dc.CMSUsers join d in dc.tblDistricts on u.DistrictCode equals d.District into orders select u; District shows this error: Ambiguity between 'tblDistrict.District' and 'tblDistrict.District' Any ideas? EDIT: It ...

Possibility to debug from .net code into SQL Server stored procedure code?

Is there any possibility to directly dive into SQL Server stored procedures from .net code? So when debugging step by step in .net, I'd like to step into a called stored procedure. I know how to debug them individually, but I'd like to join these debug sessions in order to gain some time. ...

.Net Compact Framework Tips, Tricks, and Gotchas

Hey everyone, We work extensively in the .Net Compact Framework and Windows Mobile. I've seen plenty of questions come up regarding specifics to development of ASP.Net apps or other .Net based desktop apps but nothing CF specific. Anyone else a mobile developer out there that can share some things to start doing, stop doing, and avoid ...

How to avoid XML injection

I have input field value from that is used for forming XPath query. What symbols in input string should I check to minimise possibility of XML injection? ...

Is everyone here jumping on the ORM band wagon?

Microsoft Linq to SQL, Entity Framework (EF), and nHibernate, etc are all proposing ORMS as the next generation of Data Mapping technologies, and are claiming to be lightweight, fast and easy. Like for example this article that just got published in VS magazine: http://visualstudiomagazine.com/features/article.aspx?editorialsid=2583 Wh...

C# ICollection get single value

What is the best way to get a value from a ICollection? We know the Collection is empty apart from that. ...

Areas of focus for newly unemployed programmer?

For the last year I've been working in a small firm, mainly doing photoshop to HTML+CSS, and back-end development in C#; and of course a sprinkle of javascript here and there. My background is basically summed up by being half a year from completing a bachelors degree in informatics(put on hold because working/learning .Net took most of...

user.identity.name becames Blank after a while

does anyone know why user.identity.name becames blank after a while about (10 mins), i am using .Net Framework 1.1 Edit: Session Timeout is set to 20 min no timeout is set under system.web/authentication/forms in web.config Thanks, Oscar ...

How do I get over my fears of <% %> in my ASP.Net MVC markup?

So I totally buy into the basic tenents of ASP.NET, testability, SoC, HTML control...it's awesome. However being new to it I have a huge hang up with the markup. I know it comes from my hatred of classic ASP, and I can't help but feel like I've entered the twilight zone when I see this. I don't know what the alternative is (can I use ...

Interface or Abstract Class to fulfill requirement

I want to have a abstract view for any type of UI (web or window). In order to do that I must use Interface (IView ) in which I can only apply just rules about view. In fact, I want to set a some basic comple function to provide to its inheritances. So in this way, I must use abstract class. The problem is 1) Interface only have rules ...

Sales Quote + Inventory Management for Equipment Rental

Can anyone suggest extensible (open source?) web software for generating sales quotes and managing inventory (and possibly other erp/crm functions) that would work well for an equipment rental business? For example, it would need a UI for scheduling the geographic movement of inventory over time. Integration with shipping would be a plus...

Hierarchical Filtering in ASP.NET Dynamic Data

I'm trying to create a simple system to keep track of how long I spend on certain tasks (creating a new control, modifying a report, etc) using ASP.NET Dynamic Data. I've got a hierarchical structure to the database where a Project has many Assignments, and an Assignment has many Tasks. When I go to create a new Task through the Dynami...

How can you display a session timeout warning that is smart enough to handle multiple open browsers or tabs

I have implemented a session timeout warning using javascript that simply asks the user if they want to extend their session or logout. The problem is that this is for an intranet portal where power users will often have several browser windows or tabs open at the same time to the application. Currently, they will be prompted that they...