.net

How many DB reads can we cache in Asp.net application? is there any limit

How many DB results can we cache in Asp.net application? is there any limit e.g if we cahce DataSet with 1000 rows data and we cache it through sqlCacheDependency. ...

Jabber-Net: Get user's JID in a RosterTree

Hi, how do I get the user's JID in a RosterTree? I can get the clicked user's node with NodeMouseDoubleClick but i don't know how to get his JID. Private Sub RosterTree_NodeMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles RosterTree.NodeMouseDoubleClick If e.Node.GetType()...

Update database schema at runtime with Entity Framework

I'm developing an application with EF4.0. Between the releases the database schema can change (e.g. column added, table added...). Is there a way to commit these changes to the customers database when they run the new release? I'm thinking of an function similar to CreateDatabase(). ...

Are nullable types reference types?

when I declare an int as nullable int? i=null; Is i here become a reference type? ...

In a Winforms Chart, how to change the drawing parameters for a Point according to its underlying data?

I am using the .NET Windows Forms Microsoft Chart Component. My data objects would look like more evolved versions of the following class: class DataObject { public double ValueX {get;} public double ValueY {get;} public boolean IsRed {get;} } I have been able to bind my chart to my data by setting the Chart.dataSource p...

InnerHTML including styles from stylesheets

Is there a way to get the innerHTML of a section of the page together with all style information that is used by the elements in that section(including styles that also come from corresponding stylesheets). So that when I insert the html somewhere else It will display with original styling. ...

Using POST in Rest with .Net

I have successfully added and used a Get action in my new REST-service in .Net using WCF and the Rest-toolkit. The service is defined like this: [OperationContract] [WebGet(UriTemplate = "/{id}")] Foo GetFooById(string id); And I call it like this from the client side: public Foo GetFoo(string id) { var httpClient = new HttpCli...

How to display a Gridview blank conlumns

Using VS2005 In my webpage am using gridview, In a Gridview values is displaying from the table, if there is no value in the table gridview is displaying only the header, it should display a blank columns I want to adjust the header font, content font.... Expected Output Adjust the Header font, content font of the Gridview Gridview ...

asmx web services and key value parameters

I currently have an asmx method defined like so : [WebMethod] public String Method1(Hashtable form) It receives json objects with a variable number of attributes, for example : {"form":{"name1":"10","name2":"20"}} This is working fine and gives the expected results when called, but when I open the web service address in the browser...

Spreadsheetgear run macro?

Is it possible to run existing excel macros in Spreadsheetgear? ...

ASP.Net MVC 2.0 Validating disabled input fields

My MVC validation is failing on disabled form fields - saying that they are required, even though these disabled input fields have values set. I read this http://weblogs.asp.net/imranbaloch/archive/2010/06/20/disabling-client-side-validation-for-disabled-input-controls-in-asp-net-mvc.aspx which explains how to modify the MicrosoftMvcVal...

How to prevent design mode enabled child control from being moved outside of its containing control?

I have a UserControl that contains other controls that I would like to be able to rearrange or resize at design time. So I have a custom designer for the UserControl that inherits from System.Windows.Forms.Design.ParentControlDesigner, and I call EnableDesignMode on the child controls from within the designer. That way, at design time,...

.Net POP3 client

Possible Duplicate: Reading Email using Pop3 in C# .net has a SMTP client for sending mail but no pop3 client for reading mail. Ive used WEBDAV before, but I really want a simple pop3 or imap client thats stable I know there seems to be 10000 of examples, but why no offical .net client if they made a SMTP client any thoughts...

WCF. Overhead of ConcurrencyMode.Multiple

I have a WCF service which is used synchronously, but its ConcurrencyMode is set to ConcurrencyMode.Multiple value, because the service is stateless actually. How much overhead does this mode impose? Does it make sense to change the mode to ConcurrencyMode.Single? ...

How to get Class propertyName to create lable?

how can i learn propert to create page form in asp.net class MyClass { public int id { get; set;} public string Name { get; set;} public string Name { get; set;} } ForExample : (To generate programmatically Asp.net forms) void SetRecursiveTextBoxAndLabels() { Label lbl; MyClass eng ...

Enumerating Structs and Classes for Properties at Design Time

How can I write my own structs which can be used as a property during design time? I need to be able to specify a default value, and have a selectable list of pre-defined structs for the designer to pick from, in much the same way as Color properties are implemented. Furthermore, how can I do this with classes, like Font does? How can y...

How to read from a microphone on windows mobile

Hi, I need to read a audio from the mic on PDA (running WM6) . How do it on c# ? Thanks ...

Publish ASPX to sub directory of application [Cannot Load Type]

Hello, I have published an asp.net application to a sub directory of my IIS application. I know that the web.config must exist at the root for several of the properties to work. So I have moved my web.config to the root of the application. I get the following error: Could not load type 'ProjectName.myTypeName'. I suspect that not hav...

Entity Framework using Stored Procedure - needs help.

i am using VS2008 3.5 framework. I'm attempting to use the Entity Framework for data access, but I'm running into a few issues with stored procedures. I imported this stored procedure into the framework diagram and then made it a function import but i dont see my stored procedure using (MyEntities context = new MyEntities ()...

How to get files from directory in same order as in windows explorer?

Hello everyone, how can I read the files from a directory in the same order as displayed in the windows explorer? For example, the windows explorer lists: file 1.txt file 2.txt file 3.txt file 4.txt file 5.txt file 6.txt file 7.txt file 8.txt file 9.txt file 10.txt file 11.txt file 12.txt while Directory.GetFiles() lists: file 1.tx...