.net

PDF/A Convertor .NET Component ?

I am looking for a PDF/A Converter .NET Component or a way to make one what all technologies of components should be used? Ii would take a word document as as stream and convert it into pdf etc. Convert word (2003/2007 mostly..and if other office formats etc it would be good. Convert not create. Thanks in advance. ...

Socket Server: Manage client connections

Hi, I'm wondering how to implement a client management for a socket server. I'm having the case where I would like to know whether the client has just reconnected or if it's a new client. I know, it shouldn't be that way. It's a rather temporarily server, though, which is only to be used for a couple of hours. I was thinking about let...

Chaining properties in C# & unexpected results

I was just having a quick read through this article (specifically the bit about why he chose to use structs / fields instead of classes / properties) and saw this line: The result of a property is not a true l-value so we cannot do something like Vertex.Normal.dx = 0. The chaining of properties gives very unexpected results. What...

Find minimal and maximun date in array using LINQ?

I have an array of classes with a property Date, i.e.: class Record { public DateTime Date { get; private set; } } void Summarize(Record[] arr) { foreach (var r in arr) { // do stuff } } I have to find the earliest (minimum) and the latest (maximum) dates in this array. How can I do that using LINQ? ...

Dependency Injection in .Net ?

Possible Duplicate: Help with Dependency Injection in .NET Hi friends, It is a couple of days that I've been seeing Dependency Injection in some websites ! Would you please say : What is it ? What's the benefits of using it ? Thanks a lot. ...

ASP.NET - Make a Textbox Required IF a Checkbox is checked

Whats the best way to make a textbox required if a checkbox is checked? I figure I could write a custom validator, but I was hoping to avoid a full post back to check the validation if possible... I was thinking AJAX had something built in for this scenario, but I've been unable to find it. I'm thinking straight Javascript would also b...

What’s wrong with this code

Why doesn't the while loop return anything? I assume this has something to do with .NET. I have .NET 2.0. The problem is that the while statement will execute one time then exit, as though there are no nodes with that name, when there definately are. Here is an example of the XML: <rss version="2.0"> <channel> <title>...</t...

Ambiguous Actions

Is there any way to have multiple actions with different parameters? I've seen it using the HttpPost verbs flag, but it doesn't seem to work for me in other places. The current request for action List on controller type FoldersController` is ambiguous between the following action methods. public ActionResult List() { //... } publi...

sharing interfaces with web services in .net

I am using a web service. I define an interface in the web service. Can I use this interface definition in my project that invokes the web service? I know I can use classes defined in the web service. Do I have to do anything special with the interface like add an attribute? ...

What is the name of the question mark in my URL?

http://example.com/foo.aspx?foo=bar I'm refactoring and need to name the constant which will hold only the question mark character of this string. I'm not sure what best to name the variable, as I've never known what the proper name of that question mark was. What should I name the constant? Or... is there something in .NET that's th...

get other values from source on selected index changed of combo box

I believe it's irrelevant of what type of combo box i'm using, but I'm using a Rad Combo Box. My data source not only selects data for the Data Text Field and Value Field but it also selects a couple of other columns. I want to get the values of those columns for the selected Item. How can i accomplish this on selectedindexchanged? <ta...

Asp.net Invalid viewstate - Maybe IE8 4k dropped bug??

I'm getting 100+ errors per day on my website with System.Web.HttpException: Invalid viewstate. at System.Web.UI.Page.DecryptStringWithIV The website is asp.net 3.5 running on iis6 , not running in a web-garden/web-farm , single server. The website is using xhtml doctype. viewstate size vary from 2kb-20kb Here are a few sample errors...

WPF: FixedDocument in Visual Studio 2008 Designer

It's a well-known bug that Visual Studio shows an error when you try to construct a FixedDocument in XAML. For example, the following snippet <DocumentViewer> <FixedDocument> <PageContent> <FixedPage Width="21.0cm" Height="29.7cm"> <TextBlock>Hello World!</TextBlock> </FixedPage> ...

C# Visual Studio 2008 Reference to system32.dll ... how?!?

I need the reference system32/shell32.dll as I use some shell functions to read out the recycling bin. I tried "Add Reference --> COM --> Microsoft Shell Controls and Automatation" and "Add Reference --> Browse ---> [going to the system32/shell32.dll directly]. Both adds the shell32 reference to my references. But when I look at the prop...

Using GDI+, what's the easiest approach to align text (drawn in several different fonts) along a common baseline?

My problem: I'm currently working on a custom user control which displays pieces of text (each with a potentially different font) on one line. I'd like to align all those bits of text exactly along a common baseline. For example: Hello, I am George. ------------------------------ <- all text aligns to a common baseline ...

Do you still use the .Net Configuration tool to give Visua Studio 2008 SP1 access permissions to code on a network drive? If so where is it?

Hi I cant seem to find the old mscorcfg.msc snap in to give .net permission to access a shared network drive. Ive downloaded the Windows SDK 2008 which superseded .NET 2.0 SDK (Where it used to be) but cant find it. Does anyone know if it has been deprecated? Is there a new way to give .Net permissions to a shared network drive? ...

Implementing IEnumerable<T> in C++/CLI

I'm having problems implementing IEnumerable<T> in my custom collection class in C++/CLI. Here is the relevant part of the code: using namespace System::Collections::Generic; ref class MyCollection : IEnumerable<MyClass^> { public: MyCollection() { } virtual IEnumerator<MyClass^>^ GetEnumerator() { return...

ArgumentException in BindingManagerBase during EndCurrentEdit

I have a form that is has many controls databound to a object with many properties and child objects. When we call EndCurrentEdit on the BindMaster, it throws the following exception: ArgumentException occurred: Object of type 'System.DBNull' cannot be converted to type 'System.String'. Now I'm assuming that some property in the o...

VB.Net how to wait for a different form to close before continuing on.

I have a little log in screen that pops up if a user selects a certain item on my main form. How do I get my code to stop executing til my log in form closes? This is what I am doing so far. Basically i want o execute the code after MyLogin closes. BMSSplash.MyLogin.Show() If isLoggedIn Then BMSSplash.MyBuddy.Show() ...

Can BindingManagerBase or inheriting classes handle updating object controls are Data Bound to?

The project I came into manages databinding like this: Default object is loaded on form load. Object is databound to each control property by property in code. User selects a different object to view. All controls have their databindings cleared. All controls have a databinding added referencing the new object instead of the old. I h...