.net

Serialize C# class directly to SQL server?

Hi there, can anyone suggest the best way to serialize data (a class actually) to a DB? I am using SQL server 2008 but i presume i need to serialize the class to a string / or other data type before storing in the database? I presume that this field needs to be text or binary?? Does SQL server 2008 (or .net 3.5) support serializing d...

Netmeeting in C#

I want to get some of the netmeeting functionality in my C# program. Mainly I want to be able to call a H.323 teleconference system by IP. Google turns up mention of Netmeeting SDK but no download link and it seems that Microsoft has discontinued Netmeeting altogether. Can someone give a suggestion or a pointer on the best way to go ab...

MS09-035 Vulnerability & Impact On Application Development

Hi all, Does anyone know if these patches http://www.microsoft.com/technet/security/bulletin/ms09-035.mspx and http://www.microsoft.com/technet/security/bulletin/ms09-034.mspx will apply to software built using one of the 'pure' (ie. not managed C++) .NET languages? I believe the answer is that they are unaffected as this seems to be a...

Create DataAnnotations in runtime from own metadata system.

For example I store information about display column in database and I don't want to use DisplayColumnAttribute for define this. What can I do to create DataAnnotations info in runtime? ...

Validate Linq2Sql before SubmitChanges()

Can anyone tell me if/how you can validate the changes in a data context in Linq2Sql before calling SubmitChanges(). The situation I have is that I create a context, perform multiple operations and add many inserts alongside other processing tasks and then rollback if the submit fails. What I'd prefer to do is make some kind of "Valida...

Linq: What is the difference between Select and Where

In linq there is the Select and Where methods. What should every developer know about these two methods (Example: when to use one over the other, any advantages over the other, etc) ...

C#, .NET : hide DOS command-prompt window

In C# and .NET, I wrote an application that runs in a Form (using Windows.System.Forms). I use InnoSetup to install and I am able to start the application via Windows' Start button. My problem: a DOS command-prompt window appears along with the Form. How can I prevent the DOS window from appearing? ...

how to read the assembly manifest without loading the .dll

Essentially need to read the dependencies programmatically without loading the assembly itself, as then you can't unload them ...

How can we get designers (daily?) current HTML from a dynamic site?

Our designers create graphical mockups for new designs, create the initial html, css, and image sprites & maintain those files. After the initial hand-off, our developers work everything into .Net code, templates, etc. The problem: When our designers get tasked with designing or tweaking a feature, they can't work from their initial moc...

how to debug ashx file in VSTS?

Hello everyone, I am using VSTS 2008 + .Net + C#. I am developing an ASP.Net web application. I have added an generic handler, i.e. .ashx file. How to debug this ashx file in VSTS 2008? I find there is no view in browser or set as startup page option. Any ideas? thanks in advance, George ...

Is there a Form method I can override after all controls are created but visible at design time in .NET?

I'm looking for a method that I can override in my sub classed Form where all the controls inside the Form are already created and visible at design time? I've tried OnHandleCreated() and it works as I expected at run time because I need to loop through all controls in a specific Form and do something to do them. However, I would like t...

Trying to avoid control "wobble" when resizing controls according to mouse position

Hi, I've got a set of controls in a line inside "FollowTableLayoutPanel1", contained within "TableLayoutPanel2". I have them resizing according to the position of the mouse cursor; the closer the mouse cursor is to the vertical centre of the control, the larger the control is. Because FollowTableLayoutPanel1 has its anchor property set ...

Code Protection With Loaded Assemblies (.NET)

This an example problem to illustrates my point. I'm not looking for a solution to this problem but instead the general idea behind it. Lets just say I've got a project that lets people load in dynamic assemblies -- the idea being "plug-ins". Lets say it runs on a Web Server. They inherit from the abstract plugin class and define a few ...

Maximum capacity collection in c#

In the .Net BCL is there a collection data structure similar to list that has a maximum capacity, say configured to 100 items, which when item 101 is added the original first item is popped/removed from the collection thus ensuring the item count never exceeds 100. I’m using .net 3.5 Thanks in advance ...

Internet explorer - how do you escape single quotes

In internet explorer how do I escape single quotes. &apos; works for firefox etc but internet explorer doesn't like it. For instance <input type="text" value='Single quotes `&apos;` Here' /> works in firefox but not in IE ...

.net Url rewriting for localization, issues with forms authentication and the loginUrl

I'm using a HttpModule to rewrite the urls on a multi-lingual site. In the HttpModule, I'm adding a handler for the BeginRequest event, and looking for the first part of the path which contains the culture name. For example, /fr-ca/index.aspx will be rewritten to /index.aspx and set the thread's culture and ui culture to 3084. This work...

Which has better job opportunities WinForms or Web based .Net applications?

Which has better job opportunities WinForms or Web Based. I am well versed in WinForms but when I try using web based applications I find them difficult. I like WinForms where I get events, message boxes, etc which are easy to use. Which has better job opportunities? ...

Nhibernate - Update my Customer like this?

hi. i use nhibernate. i got a Customer and Customer got a IList.. now when i add a new Customer and CustomerUser i do like this. var customer = new Customer { Name = txtCustomerName.Text, OrgNumber = txtOrgNumber.Text }; var customerUser = new CustomerUser { Email = txtUserMail.Text, Password = password.Sha1() }; custom...

In ASP.NET 3.5, what is the namespace for the ReorderList control?

I am trying to extend the Reorderlist contorl in ASP.Net 3.5, however I cannot find which namespace I need to import in order to inherit form the original control (System.Web.UI.WebControls does not appear to be it). In ASP 2, I know it came as part of the AjaxToolKit, but I am specifically looking for the version rolled into 3.5. Any...

How can I use jQuery AJAX to update my Gridview?

I have a gridview with rows that can be edited, inserted etc. I wrapped it in an updatepanel to give it an AJAX effect and update the system without reloading the page. I recently got into using jQuery and webservices for my AJAX calls and I absolutely love how it works and how fast it is. I would like to know if it is possible, and i...