.net

BackgroundWorker and Progressbar.Show()

Hi, I am using Visual Studio 2010 and C# and try to get my progressbar to show but it doesn't work. I listen to an event. If it happens I want to do some work and show a progressbar while doing that. This is what I do: static void Main(string[] args) { ProgressForm form = new ProgressForm(); new FileWatcher(form).Start(); Appl...

What's the difference between Console.WriteLine() vs Debug.WriteLine()?

What's the difference between Console.WriteLine() vs Debug.WriteLine()? ...

Fill business object from database by calling stored procedures?

Hello, I have several stored procedures in my database, some of them have params, some have no params. I tried to fill a business object by calling the stored procedures, but failed so far. How could I do that dynamically? Later, I want to use this object as a datasource for a report...but thats the next step. The important facts are: ...

vb Writefile zip issue comes as a ashx

I have a ashx page handling file/attachment requests last line of code is System.Web.HttpContext.Current.Response.WriteFile(filename) It ends up downloading a file called GetFile.ashx (which sounds like a page name but if I rename the .ashx to .zip it is actually the correct file... Any reasons why this might be happening and how to...

Attach an entity that is not new error - when 2 users save at the same time: Please Help

Problem happening when two users at the same time try to Submit CHanges to the datacontext. Datacontext are in the HTTPContext so they are not being shared PLEASE HELP ...

Get crashing application stack trace

Is there any program that anyone knows off (not a debugger) that will produce a stack trace of a crashing application? The application crash can be simulated at will on a server on which I cannot necessarily install a debugger. That's why the question if there's no other way to get a stack trace so I can then have a look. ...

Confirm box always displays first (javascript, jQuery, .Net)

Hello, I have a jQuery-Script to accomplish the following tasks: if a gridview in my form contains a row with a certain id, it has to be marked red. a confirm dialogue has to pop up to ask the user if he wants to do this or that. I built this code: if (response == "EntryInList") { $('#entryListContainer d...

Can expiration policies be configured in entlib caching application block?

Hi, Is there a way to tell a CacheManager that every item added will have the same expiration policy? For example in: <cachingConfiguration defaultCacheManager="DefaultCacheManager"> <cacheManagers> <add name="TestCM" expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="10...

Mobile Internet Development in .NET

Hi, What would be the best way to create at mobile website in .net. What I want is to create a website that switches to wml, xhtml, html etc based on the device that access the site or blocks the component if the device doesn't support it (images, flash etc). I've found the "Microsoft Mobile Internet Toolkit", which seems to do what ...

WPF DataGrid RowDataBound?

Ok this is driving me mad, I feel like a total Newbie. I'm using WPF's DataGrid control from WPF Toolkit with .NET 3.5. Link on Codeplex here I want an equivalent to the classic GridView's RowDataBound event, and I can't find any. I tried working with LoadingRow, but it fires every time I scroll. I'm trying to change the background co...

how to check whether xml file has access or not in c#?

i am saving dafault values in an xml file. if i dont have access to the xml file i should show message in the status bar ...

the breakpoint will not currently be hit no symbols loaded

I want to debug on the customer's machine (Windows Server 2003) to track a problem, and out product is based on .NET 2.0. I want to use DbgCLR.exe to debug a file AAA.dll, what I did is: install .NET 2.0 SDK on the customer's machine (to get the DbgCLR.exe) copy the symbol file AAA.pdb to the same directory with AAA.dll get the source ...

How can I load class's part using linq to sql without anonymous class or additional class?

class Test { int Id{get;set;} string Name {get;set;} string Description {get;set;} } //1)ok context.Tests.Select(t => new {t.Id, t.Name}).ToList().Select(t => new Test{Id = t.Id, Name = t.Name}); //2)ok class TestPart{ int Id{get;set;} string Name {get;set;} } context.Tests.Select(t => new TestPart{Id = t.Id, Name = t.Name...

Database layer design question

Hi all :) I've been designing a database access layer that allows us to support multiple databases in our programs. In the end, the users of our programs shall be able to choose the underlying database system from a range of database systems. Some small clients might be happy with MS Access, others prefer MySql, others DB2. Those db sys...

Import fixed width file to oracle

Is there an ability to import fixed width file to oracle? Preferably through .net(c#) for catching errors during import and showing them to user. P.S. File has 5 types of rows. For example 1 row has 5 columns, 2-nd has 50 columns. ...

how to check whether xml file content is in correct format?

i have one default.xml file where i am storing all default values.suppose if invalid file with the same default.xml name exists i have to display message in the status bar. ...

WriteableBitmap in .NET 4

Hi there, I have got a problem: I would like to use a method Render() for WriteableBitmap object. However, as I noticed, the method is not available without using a Silverlight assembly System.Windows.dll. I need to use RenderTargetBitmap in my project (PresentationCore assembly for standard .net). Here is the problem - there are defini...

Visual Studio: how does VS decide to build a release or debug exe

Hi, I just created a new project configuration. I named it 'Blah' So no 'debug' in it. Now how does Visual Studio know when to compile a debug file or a release file. is this merely defined by the DEBUG constant? Or am I wrong? :) Thanks I'm using C#, with Visual Studio 2008. Thank you for your answers. I read that I need to d...

Bind code behind Resource file value to javascript confirm delete

I would like to show Confirm alert on button click, but confirm message I would like to show from a global resource file? How do I do this? Something like this. OnClientClick="return confirm('<%$ Resources:MfnWeb, ConfirmCloseAccount%>')" ...

Calculate a set of concatenated sets of n sets

Okay - I'm not even sure that the term is right - and I'm sure there is bound to be a term for this - but I'll do my best to explain. This is not quite a cross product here, and the order of the results are absolutely crucial. Given: IEnumerable<IEnumerable<string>> sets = new[] { /* a */ new[] { "a", "b", "c" },...