.net

How do web controls know which method to go when an event occurs?

I have a LinkButton in a web control and I want to bind the event at the page where I use this web control. LinkButton's href attribute is renderedas below. javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ctl00$CoreContent$Content$scale1", "", false, "", "/thema/fi/product/reviews.aspx", false, true)) It ...

Parsing XML in C# XML for specific Content

I am trying to parse an XML response from a website in C#. The response comes in a format similar to the following: <Company> <Owner>Bob</Owner> <Contact> <address> -1 Infinite Loop </address> <phone> <LandLine>(000) 555-5555</LandLine> <Fax> (000) 555-5556 </Fax> </phone> ...

How to open a firebird .db table file using c#.Net

Hi, I have a Firebird .fdb file and can open it fine. But some tables are empty, and I can open the .db files of these tables using 3rd part programs. This was not developed by me. Now I need to open a .db from a table from firebird using c#.net Some knows how to do that? I dont want to open the database, connect to it, etc, just open ...

C# Regexp: How to extract $1, $2 variables from match

Currently .NET uses their own nonstandard capturing group naming convention which is a dog. I would like to enable the standard use of $1, $2 capture groups in C#. Is their any way of doing it, or if not, is their any thirdparty regexp engines available for use, which do implement that kind of functionality. ...

Using AutoMapper to map from XElement to a strongly typed class ?

Can I use AutoMapper to map from data in an XElement to my own type ? How ? ...

How to export generic types to COM? Type library exporteder encountered a generic type instance in a signature.

I have a method with a default parameter: void Test(int? iRange = null); When trying to expose my class to COM, I get a warning: Type library exporter encountered an generic type instance in a signature. Generic code may not be exported to COM. Is it possible to some how expose this method? Edit Sorry, i think this is to do with t...

Can you static link satellite assemblies?

I don't know enough about satelite assemblies to understand their construction, I'm curious if it's possible to statically link them all into a single dll and get the same functionality as if they weren't statically linked from: ResourceManager.GetString("SomeStringIdentifier", CultureInfo.GetCulture(someCultureThatYouHaveResourcesFor))...

WPF ListView selection issue with CheckBox

I have a WPF ListView control for which I am dynamically creating columns. One of the columns happens to be a CheckBox column. When the user directly clicks on the CheckBox the ListView's SelectedItem is not changed. Had the checkbox been declared in XAML I would have added handling for the Click event to manually set the selection. Howe...

A class with string file extensions, how to do this?

Hi. I'm want to do a class with file extensions, I thought the extensions should be strings. My problem is I'm not sure how to do this class? I want it to be kinda static so I don't have to declare it like new. I would appreciate any help I can get on this, it's often I find myself in situations where I would need a class like this. EDI...

Should I clean *.vshost.exe and *.vshost.exe.config from release directories?

I have found a number of vshost files in production deployment folders. I know what these are for and that they don't belong here. My question is, do they do any harm? Is it worth me spending the time checking all of the deployment folders for 100+ applications to make sure that they are removed, or is this a waste of time? I would have...

opening a file in the browser instead of downloading it

Im using ssrs through a reports server to generate a resultStream byte array using ReportExecutionService.Render() which I am currently serving to the user with the following code. Is there a way I can use this same byte array to automatically open the report in a new browser window instead of going to the save/open dialog? public vo...

ref and out in C++/CLI

Hello I know that the C++/CLI code void foo(Bar^% x); transforms into Void foo(ref Bar x); What is the C++/CLI code that becomes Void foo(out Bar x); ? ...

WPF Custom Attached Property in DataTrigger

I've looked at similar questions here on SO and wasn't able to get a solution, so here's my deal: ** I Have the following class: ** public static class ControlSecurity { public static readonly DependencyProperty IsSecuredProperty = DependencyProperty.RegisterAttached( "IsSecured", typeof (bool), ...

What are some top reasons to upgrade to .NET 4.0?

What are some top reasons to upgrade to .NET 4.0? ...

Preventing Visual Studio Designer from Setting Text Property on Creation

I've got a problem with Visual Studio Designer's convention of setting the text in a TextBox to the name of the control. I've got a control that accepts a Social Security Number, and the Text property is overridden so as to throw an exception if the text is not in the correct format (e.g. 123-45-6789 or 123456789). When I try to use th...

.NET Data Storage - Database vs single file

I have a C# application that allows one user to enter information about customers and job sites. The information is very basic. Customer: Name, number, address, email, associated job site. Job Site: Name, location. Here are my specs I need for this program. No limit on amount of data entered. Single user per application. No concur...

Is there any reason to use Win32 API (in C or C++) over .NET?

I'm finishing my summer job where I write graphical software for our baggage scanners. Everything is done in .NET or MFC, with plain C++ for hardware communication (I don't do any of the hardware stuff). I sometimes resorted to Win32 API calls such as SendMessage to improve performance of a form or control. I've had only a year's worth o...

Object initializers in using-block generates code analysis warning CA2000

If I use object initializers in using-block I get Code Analysis warning about not disposing the object properly: CA2000 : Microsoft.Reliability : In method 'ReCaptcha.CreateReCaptcha(this HtmlHelper, string, string)', object '<>g_initLocal0' is not disposed along all exception paths. Call System.IDisposable.Dispose on object '<>g_initLo...

errors when i try to add db from another server to my solution

I have a classic ASP website I am working to try and convert to .NET- one page at a time. I am using VS2010 for this. The development db is on a network share drive, and when I try to debug my application I recieve an error because the BIOS command limit has been reached, as a result of the db being located on a network share drive. Is t...

Sensitive Data in EF4

What would be the best way to hide sensitive data from being exposed when using the Entity Framework? (for example, a table that contains a SSN column...etc) ...