.net-3.5

DateTime Format in C#

Hey guys, I experiencing a strange behavior of C#. Its some thing like this.. var date = DateTime.Now.ToString("MM/dd/yyyy"); I expecting out to be 04/24/2009 but in actuall its returning 04-24-2009 and my OS culture is en-GB, I'm using .Net 3.5 and WPF any solutions please... ??? ...

FaceBook publishUserAction FaceBook Developer Toolkit 2.0?

I am so lost on this. I am trying to use the publishUserAction feature and have no idea what the correct way is to publish stories on FB. I get an error that I cannot automatically publish one-liners using Connect. OK, so what do I need to do then? Do I need to use the Feed Forms? Any help on this is greatly appreciated. I have been usin...

ASP.Net button click event not firing

This is perhaps related to this question, but I have slightly more information. I recently updated an ASP.Net application to .NET 3.5 after coding a few new pieces with Linq. Now my pages intermittently stop firing event handlers. I have it narrowed down to pages with Ajax on them, and I assume it's either the ScriptManager or the Aja...

How can I get gzip compression in IIS7 working?

I have installed Static and dynamic compression for IIS7, as well as setting the two web.config values at my application ( Virtual Folder ) level. As I understand it, I don't need to enable compression at the server, or site level anymore, and I can manage it on a per folder basis using my web.config file. I have two settinsg in my .co...

ClickOnce download fails unless end user has VS2008

I'm still working on the problem described here, trying to get ClickOnce to work from Visual Studio 2008. I originally assumed the problem was related to the fact that the application I was deploying was upgraded from 2005. But that's not the case. I created a new VS2008 application and deployed it with the same result. I've tried (I th...

Get auto_increment ID from SQL Compact Edition

I am prototyping an app using ASP.NET MVC and SQL Compact Edition on VS2008. I have 2 entities that have have a many-to-many relationship with each other. When I save objects to the database through hand-crafted SQL I need to find out what their ID is so I can drop a record into the mapping table between the two entities. The auto_inc...

Microsoft Entity Framework

I'm not sure if this question is appropriate for SO, but I'm sure a few people here have been through it: I'm trying to follow the MVC tutorials on the ASP.NET website and there's a point at which it has you add an ADO.NET entity to the project, but for some reason, it doesn't appear on the dialog for adding a new item. I've got SP1 for...

Filter Gridview results using Linq to Sql Object datasource with a LIKE operator

I have a gridview bound to a LINQ to Sql datasource. I would like to filter the the results in the gridview using the LIKE operator. i.e I have a textbox used to Search on Username and I would like to select all users with the username like [textbox value]. Below is my code: <h1>Manage Users</h1> Search for users Username: ...

How to set multiple selected values in asp.net checkboxlist

I have a asp.net checkbox list bound to a linq to sql datasource and when I check the item count of my CheckBoxList on the page load event it is 0. I want to be able to set the selected items on my checkboxlist here but cannot. The datasource's selected event fires after the page load. If this is the case, how can I set the selected ite...

WCF WebService / IIS Hosting & Configuration Issue Behind a Firewall

I have a simple WCF Web service. It's hosted on IIS under the default website in our production domain. (local address: 10.10.20.100) By default this default website was setup for "All Unassigned" IP's on Port 80: however, I noticed that this caused the WCF Service to generate it's WSDL using the servers local DNS name. i.e. all the URI...

Entity Framework: Regeneration of changed tables (key changes)

I've got a pretty large DB hooked up to my Entity Framework. I've got one particular set of tables where a common key (fk) was deleted from the design. When I "update the model from the database", I get a series of errors about this now-missing key. Why doesn't the update process accurately detect that this key was removed? Also, if I m...

Is it possible to open 2 connection on Windows mobile (3.5) ?

Hi Is it possible to open 2 connection to database (.sdf file's) on windows mobile ? (frameWork 3.5) if yes, how can I do it ? thank's in advance ...

.Net 3.5 database access

Hi everyone, I guess I'm old school, when I architect a project I still think of writing a database layer that includes use of objects like datareaders and datasets... But it seems to me that Microsoft had to come up with better tools since my last project in 2.0, something that would hide all the pipping labor and keep the developer fo...

Transparency key and Vista

I'm trying to use transparency key. According to the documentation, you're supposed to be able to use this to put "holes" in the Application where you're supposed to be able to click through the transparent areas in the application and work (eg. "click" on things behind it). However, in Vista Ultimate 64bit , I can't. The following code ...

Localization support for Chinese

Hey guys... I need to support Chinese in one of my application on Windows, the problem is that I need to support for Chinese Mandarin and I did not find any locale code for it, can you clarify whether Windows support Mandarin chinese or is there any alternate?? ...

Difference betwwen Datacontext and ItemSource in WPF

Duplicate of : http://stackoverflow.com/questions/793340/who-has-the-best-answer-for-why-datacontext-and-itemssource-are-not-redundant/793350 In WPF we can assign list of item to ComboBox in 2 ways //CODE #1 //WPF <ComboBox name="cmbItems" ItemSource={Binding} /> //C# cmbItems.DataContext = someList; another way, directly assign...

Create xml from xsd with xlinq

How do I generate, based on a xsd and c#, an xml containing only the mandatory elements. I would prefer to use xlinq but I am also open to alternatives. ...

linq to xml (c# to vb.net conversion)

What is the VB.net syntax below for? var list = xd.Descendants("product") .Select(element =>new { Title = element.Attribute("title").Value, Duration = element.Element("duration").Value }).ToList(); ...

.NET implementation of Excel Yield function

Excel's add-in named "Analysis ToolPak" provides "Yield" function for calculation of yield on security that pays periodic interest. Function works well and returns proper data. My understanding is function base on kind of iteration it is not so easy implement it in my code. My question is anybody know/seen implementation in C# (eventu...

How can I convert anonymous type to strong type in LINQ?

I have an array of ListViewItems ( ListViewItem[] ), where I store a SalesOrderMaster object in each ListViewItem.Tag for later reference. I have some code that right now, goes through each ListViewItem safely casts the .Tag property into a SalesOrderMaster object, then adds that object to a collection of SalesOrders, only after checkin...