.net

Using .Net Web Control - How to Set a Value in a TextBox *INSIDE* of an IFRAME.

I'm trying to use a .Net WebBrowser control to log into a website and aggregate some data for me. I'm also using a reference to MSHTML (but I don't care if your solution does or doesn't). When I visit a 'normal' website - I create an mshtml.HTMLDocument from the webBrowser's .documment. Then I create a mshtml.FormElement and a mshtml....

What's the right way to check for inheritance from a class/interface?

The code below is looping through a dictionary of strings and IMyCompanySettings looking for values that implement IMyCompanyProductSetting. Clearly, trying to cast and raising an exception is a very expensive way to do this. public static List<IMyCompanyProductSetting> GetProductSettings(ConfigurationManager cfm) { List...

Interfaces question

I'm trying to understand the -why- of this ... and I'm really struggling to grasp the concept of what I'm telling the compiler to do when I use an IInterface syntax. Can anyone explain it in a "this is what's going on" way? Anyway ... my main question is.... What is the difference between public IEnumerable<string> MyMethod() {...} ...

Can I use XDocument.Save and exclude the XML Declaration?

I'm loading a XML file into a XDocument, doing stuff to it, and calling Save(fileName) to rewrite the XML file. The original file has no XML declaration, is there anyway to avoid XDocument adding a XML declaration? ...

In .net why is throwing an exception computationally heavy?

In .net why is throwing an exception computationally heavy? ...

Need help to decide what is the best solution to tracking system (.NET)

Hello people ! That is my first question around here, my name is Anna! My problem: My client has several personal devices (blackbox with gps) to locate people/car... There are about 12000 people/car using that device... It sends their location to specified IP/Port... I can´t do anything on that side... My job? Devolope a listener to ca...

How to set default encoding of source file to UTF-8 in VS.NET 2005

I use Chinese in my comments and configs. And after I auto merge and check in source files, they become messy codes. I guess the reason is TFS merge them by UTF-8 encoding but my VS.NET is using gb2312 encoding. I know I can get and change each file from menu [file->advance save option] Can't I set VS.NET 2005 always create and save C# ...

How can i code a program that works with a front end and some modules?

It will be a desktop application, coded in visual basic (vb.net) or c#. The idea is to have just one main .exe as front end form. It will load all modules installed and display each in a different tab. This form should have functions to install a new module, update an installed module or delete. As an example, think about a tabbed pane...

C# deserialize unknown abstract class

I am only familiar with the basics of serialization, now I have a use for it. I have an existing reporting system with a ReportBase abstract class and multiple reports deriving from the base class. These each have different report parameters specified in the constructor and occasionally extra methods. Is it possible to serialize any of t...

Small Caps Font Property?

I'm looking for a way to create a .NET Font object that formats the text like in Word when you check the "Small Caps" check box. I'm not seeing a Format Style on the Font object to do it, and I was wondering if A. There is something that I'm missing or B. There is a third party library out there (preferably free) that will do it instea...

Where can I find a nice .NET Tab Control for free?

I'm doing this application in C# using the free Krypton Toolkit but the Krypton Navigator is a paid product which is rather expensive for me and this application is being developed on my free time and it will be available to the public for free. So, I'm looking for a free control to integrate better into my Krypton application because t...

Cruise control.NET invoking an IDE

Hi, I have an IDE named VxWorks 653 2.2.3 Development shell which needed to be invoked all the time when i notice any change in my source files.So i had invoked this shell through a VB scripts which invokes two more .bat(Batch files) to get this shell popped up for execution.Now i feel that since my IDE can be invoked by command lin...

LinkPoint payment integration with IIS7 crashes w3wp.exe

My assemblies that wrap a third-party DLL work fine in my windows test harness app, and they also work fine in a web service when spawned in debug mode (VS 2008 Visual Studio Development Server)! However, the app always crashes when running in the local IIS 7 web server. Here is the crash detail from the event log when running on the l...

What is the best way to handle (nested) record sets?

Hi to all. What are the best (cleaner, less resource expensive) ways to pass one-to-many relationships from a db server to a client? Imagine that I have a Author table and a Book table. I want to to retrieve all the authors whose name starts with "a" and all the books they've written. Then, client-side, generate an array of objects "Aut...

ADO.NET SQL Client Provider default database connection

Does the .NET SQL Client DataProvider always connect using the master database. I've noticed that when I connect to the database to execute an ADO.NET query and then look at the active connections in SQL Management studio, the SPID for the .NET SQL client provider always uses master DB The initial catalog in my connection string is tha...

How can i add checkbox in listbox(asp.net)?

How can i add Checkbox in listbox. i want to make it in asp.net . ...

Ambient objects in .NET

Hi, How do i create ambient objects in .NET that are available throughout a method chain. For e.g. the TransactionScope object. ...

IIS 6 with wildcard mapping and UNC virtual directory problem

Hi. On our production servers (win 2003 with IIS6 and load balanced with an F5 BIGIP), we have a problem when introducing wildcardmapping on IIS6. We use .net Framework 3.5 SP1. The issue manifests itself as by the server only sometimes serving the images stored on a virtual directory pointing to a UNC path. Sometimes the images are di...

Extending c# code with separate assembly

I have some extra functionality i need to add which includes adding a new property to an object and extending methods in another class that handles this object. I'm dealing with source code of a product (in C# 2.0) we use which i really don't want to modify, i just want to extend on it. I'd ideally like to have a separate assembly to d...

Secure Serialization

I'm writing a client/server that will allow Customer Data to be shared between our head office and on-the-move sales folks within the company. The server downloads and writes the customer data in XML files but also keeps the data in memory so that it can act as a local client as it were. I'm planning to Serialize the ArrayList so that ...