.net

Value from Hidden Input field as an Actionlink Parameter.

Hello, is there a way using Javascript or Jquery to use the value of a hidden field which i modify dynamically (depending on other stuff) to and actionlink helper? <%=Html.ActionLink("Groups", "List", "Home", new { brokerId = ??? HIDDEN INPUT FIELD ??? })%> Thanks in advance. ...

DataGridView Custom Column with databinding support, unexpected behaviour on initial load.

I am trying to load a custom column (code below) in datagridview in winforms, the custom column binds a integer value into it and displays the integer value along with a unchecked checkbox in it: public class LabelledCheckBoxColumn : DataGridViewCheckBoxColumn { public LabelledCheckBoxColumn() { this.DefaultCellStyle.Ali...

Running Topshelf service using ConfigureServiceInIsolation - Generic Host

I am developing a very simple Generic Host solution that will allow us to host assemblies as windows services (ala NServiceBus). I'm coming across the following exception (similar to the comments mentioned on Dru's blog post). I need this to work so I can host services in different AppDomains. "Type 'MyProject.WindowsServices.GenericHos...

What does <.ctor> mean when it appears in a symbol in .Net

I have a symbol that appears that is listed as MyNamespace.MyClass.<.ctor>b__8() What exactly does the <.ctor> mean? Or the b__8() for that matter? ...

StringBuilder or +=

Hello, I receive around 5 messages per second. Each of them has a string, which I concatenate to a master string that contains all the received messages string _masterText = ""; public void AddNewMessage(string text) // this is going to be call at least 5 times/second { _masterText += text; } Is this the ...

SQL command problems (C# Winforms)

Hi All, I am successfully connecting to my sql 2008 server hosted on winhost.com. But I am following this tutorial: http://www.codeproject.com/KB/database/sql_in_csharp.aspx which was suggested in an answer from: http://stackoverflow.com/questions/3357374/connecting-to-sql-server-database-c-winforms and I keep getting the exact same err...

Is there a way to ask about the status of a drag operation while it is in progress?

I know that when a drag/drop operation is completed, upon receiving a MouseUp or Esc key event, it returns an enum that indicates what happened (Move, Copy, None, etc.) My question is this: is there a way to send back status information to the form/control that initiated the drag event, while it is going on? The use case is as follows (...

In C#/.NET, how many instances and references are created for a Base-Sub Class

In C#/.NET: I have 2 concrete classes. Class A and B. Class B subclasses from Class A. How many instances (objects on the heap) and references from the stack to the heap objects are created for each line of code: ClassB b = new ClassB(); ClassA a = new ClassB(); Thanks! ...

Generic function new with parameter problem.

HI, I have a generic function as shown below. It can be used to show a form by calling showForm(ch); IT works for the second function (new without parameter) ,But if I want to show form but with parameter in the constructor as in the third function (new with parameter) ,then I could not do it .Any one has an idea how to do it? ...

Easiest way to use SQL in a C# application?

I'm making an application in C# (with Express Edition) for which I would like to add some SQL functionality so that the user can query a database. I don't care how or where I store the database. I can store it in a DataTable or a bi-dimensional array or any kind of file. But I want the user to be able to SQL-query it. Apparently this sho...

How to improve efficiency of GridView or DetailsView in ASP.NET?

Hello Everybody, In ASP.net when we perform paging over Gridview or DetailsView than the Gridview fetch all rows from the Database each time. Suppose our Database contains 100 rows and we have configured Paging in Gridview with page size of 10 records per page.But whenever we click on the the pager control of gridview for any particula...

Anyone with any experience in internet fax services? (looking to build a .Net app that sends fax)

Looking to build a smartphone (iPhone/Android/Blackberry) web app that accesses a .Net app, which in turn will fax a photo you've taken with your smartphone. Has anyone used any 3rd-party internet fax services like this? Any recommendations? ...

Why does ClientBase Dispose need to throw on faulted state?

Why does ClientBase Dispose need to throw on faulted state? ...

DAL: Application domain POCO classes <-> EDMX generated classes conversion best practice

DAL library exposes interfaces that return and accept application domain POCO classes. DAL uses EF inside with EDMX generated classes. What are the best practices to convert POCO to EDMX? It may be straightforward public PersonInfo GetById(Guid id) { return DataContext.PERS.FirstOrDefault(x => new PersonInfo { Id = x.Pers_id,...

HttpWebReqest in page fetcher slow down

I have a crawler that download pages and process them. after 1 hour every request to the sources takes 1 minute or more to complete but in the start of the program every address is downloaded under 1 second, I suspected that destination web sites limit my request or traffic but when i close the program and run it again performance return...

C#: Iterate over each Day between StartDate and EndDate

I have a DateTime StartDate and EndDate. How can I, irrespective of times, iterate across each Day between those two? Example: StartDate is 7/20/2010 5:10:32 PM and EndDate is 7/29/2010 1:59:12 AM. I want to be able to iterate across 7/20, 7/21, 7/22 .. 7/29. Help? ...

Video Capturing + Uploading + Processing + Streaming back - .NET & C#

We are trying to find out any technologies/libraries available in .NET stack (even wrappers on top of 3rd party dlls) that'll help us to build an app that can 1 - Capture an image from a user's video device 2 - Upload it realtime to a server 3 - Process the video (in the server) - eg: Adding a watermark to the video 4 - Stream it back ...

CallBack in WCF?

How we use CallBack in WCF fluently with events and delegates? If Client give any request or any conditions matches of client then services automatically fire the event which condition or request given from client. how is it possible? ...

Synchronize access to keys stored in distributed cache (SharedCache)

In my project I am using SharedCache as a distributed caching mechanism. There are multiple instances of a service deployed in webfarm which accesses this cached data. The data which is cached is transient and can have updates. I would like to know if there is any way we can synchronize the access to the data between two or more services...

How to upload Only Excel file using RegularExpressionValidator?

i need to control Only ExcelFile uploading with RegularExpressionValidator How can i do that? i need to write a regex pattern in ValidationExpression... <h3>FileUpload Test</h3> <div> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button id="UploadBtn" Text="Upload File" OnClick="UploadBtn_Click" runat="ser...