I have some update panels on my page that do some asyncpostbacks to keep some dropdownlists correctly populated. My problem is that on my page i have an HTML input that is handling some file uploads. With the AJAX on the page with asyncpostbacks, and while i step through my code behind, the files arent being uploaded. Using a postbacktri...
How can I enumerate methods that have MethodAttributes.PrivateScope using Reflection?
...
I'm having a weird error which is related to an earlier post. I am checking if a file exists before downloading. This works for PDFs, but not for any other type of document.
Here is my controller action and the typical path for a PDF and a PowerPoint file, the PowerPoint does not work, the File.Exists always returns false. Both files ph...
So yeah, Im building a little authenticated content(.NET app) to a large html site managed by another group. They are only comfortable with managing html so all my app content will be contained in iframes. Everything is working fine as far as navigation and calling services and whatnot but i cant bust out of the frame with my asp:login c...
Is there a method anywhere in the .NET framework or System.Web that will tell me whether a string contains an HTML or is one?
Should I just Server.HtmlEncode(myString) and see if its length is longer than myString's length before encoding?
...
I'm trying to build a sample game in Silverlight 4 using the MVVM design pattern to broaden my knowledge. I'm using Laurent Bugnion's MvvmLight toolkit as well (found here: http://mvvmlight.codeplex.com/ ). All I want to do right now is move a shape around within a Canvas by pressing specific keys. My solution contains a Player.xaml (...
Is it possible in OpenRasta to have a Uri pattern that allows for an array of values of the same key to be submitted and mapped to a handler method accepting an array of the query parameters.
Example: Return all the contacts named Dave Smith from a collection.
HTTP GET /contacts?filterBy=first&filterValue=Dave&filterBy=last&filterValue...
Is there an easy way to determine the size of a Form it does have in WindowState=Normal, without actually changing the Form state?
Here is what I do now (C# code):
public class MyForm: Form
{
public void MyMethod()
{
// ...
FormWindowState oldState = this.WindowState;
this.WindowState = FormWindo...
I'm creating a paging class and trying to allow for some dynamic configuration for the method to call when Next/Previous links are clicked.
The class looks like this:
public class Pager
{
public int StartIndex { get; set; }
public int Range { get; set; }
public int NumRows { get; set; }
public event EventHandler Paging;...
Possible Duplicates:
c# array vs generic list
Array versus List<T>: When to use which?
I understand that there are several benefits of using List<>. However, I was wondering what benefits might still exist for using arrays.
Thanks.
...
Going through some WCF hosting questions on StackOverflow, I've seen Dublin mentioned a few times as a technology from Microsoft that is forthcoming. It's only alluded to and not actually defined though. Can someone give me a good explanation of what Dublin is? Also, what is its release status and is it going by a different name now?
(H...
Hello,
I am creating an application in .NET using winforms. That application must draw on a Panel.
Is it possible to paint objects on different layers, and combine that to one image on the panel?
One layer has many objects on it.
...
I have been encountering an issue with inserts in EF 4.0.
During a migration from one system to another I migrate the values of three configuration tables into a database fronted by EF.
The following code crashes:
foreach (MyModel model in models)
{
if(entities.my_Model.Where(p => p.Id == model.modelId).Count() == 0 )
{
...
I am using an ASP.NET ListView control and, at the moment, I have a scrollable grid:
(example below is simplified and contains embedded styling for sake of question)
<asp:ListView ID="ListView" runat="server" DataKeyNames="Id">
<LayoutTemplate>
<div style="height:225px; overflow:auto;">
<table runat=...
In LINQ to SQL, I want to avoid setting some columns if others haven't changed? Say I have
dim row = (From c in dataContext.Customers Where c.Id = 1234 Select c).Single()
row.Name = "Example"
' line 3
dataContext.SubmitChanges() ' line 4
Great, so LINQ to SQL fetches a row, sets the name to "Example" in memory, and generates an upda...
I've been playing around with IL and I noticed OpCodes like Prefix1, with documentation basically telling me not to worry about it. Naturally, this makes me quite curious as to what these various Prefix OpCodes actually do. A quick Google search didn't turn up anything, so I thought I'd ask the experts here. Does anybody know what the...
I am relatively new to WPF and sometimes it makes my head explode. However, I do like the power behind it, especially when used with the MVVM model.
I have a control template that contains a button. I use that control template inside of a custom control. I want to add a property on the custom control that will bind to the command proper...
I'm using a System.Windows.Forms.DataVisualization.Charting.Chart control, and have the ChartArea's AxisX and Y both set Zoomable to true. When chart is zoomed in, I see the scrollbar, but cannot drag it. Is it possible to drag the scrollbar, and have the chart display move as I am dragging the scrollbar button? I want to make it intui...
I'm currently trying to make a class that can register strings as identifiers and accociate them with different types of Enumerations, these enumerations are being evaluated only in so much that I am ensuring that when it's used, that the parameter passed to broadcast (messageType) is an instance of the associated Enum Type.
This would ...
I have created a class library (assembly) that provides messaging, email and sms. This class library defines an interface IMessenger which the classes EmailMessage and SmsMessage both implement.
I see this is a general library that would be part of my infrastructure layer and would / can be used across any development.
Now, in my appli...