.net-3.5

sending email notifications for future dates in asp.net 3.5

I want to develop an Online Reminder service in ASP.NET 2.0 (C#) and SQL2005. But I am not getting the concept of reminder service. What I know is using an online reminder service I can schedule a reminder for future dates, which is sent to me (who schedule reminder) via email or SMS on that date. But in asp.net how to do this, caz anyon...

In WCF is it possible to pass a delegate to the remote object?

Is it possible to pass a delegate to a WCF remote object from the client and have the remote object execute the delegate? I would guess not since a delgate is a function pointer for the client process. My goal is to have an interface structure that I can "subscribe" to events from a client to the interface. I would pass a delgate from...

Setting my Display Resolution

Hi, I'm a C# developer and I have to change my display resolution regularly. There are plenty of examples on how to read the current display resolutions: SystemInformation.PrimaryMonitorSize I found the ChangeDisplaySettingsEx Function Is the only way to do this in C# is with PInvoke??? It seems odd to me that it is very easy to get...

AJAX Enabled WebApplication

Hello does sy know why the Ajax Enable WebAppication in VS 2008, even if you put the target framework 3.5, target afterwards .NET 2.0 framework? (so I create the Web application with ASP.NET 2.0 Ajax Extensions 1.0 features enable (.NET framework 3.5) , then I check the Target Framework in the Application Tab of the project properties ...

Best mechanism to implement an IPC Bus in .NET?

I have several apps that want to communicate LOCALLY via a data bus. Ideally: They talk and listen whenever they come online There will not be an "owner" of this communication method. No extra components to install (ie. Message Queues) It would be nice if there were no ports to require open What do you think is the best technology...

How would you refactor this smelly code? (Logging, Copy and Paste, .Net 3.5)

I've got code like this: Logger logger = new Logger(); System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch(); logger.LogInformation("Calling SomeObject.SomeMethod at " + DateTime.Now.ToString()); stopWatch.Start(); // This is the method I'm interested in. SomeResponse response = someObject.SomeMethod(someParam); st...

Pushing out a PDF file to IE from an ASP.NET 3.5 site

My application pushes out a PDF file to a popup (e.g. no menu/toolbar) browser window (in response to the user clicking a button). This works for every browser out there except for IE7. In IE7, all I get is a blank window. Here is the server-side code that pushes out the PDF: private void StreamPDFReport(string ReportPath, HttpCont...

For each get RowIndex

Is there a way in a for each to get the row index ? Example : int rowIndex = 0; foreach (int a in numbers) { // Manipulation rowIndex++; } What I would like to have foreach (int a in numbers) { a.RowIndex; } Is there a quick way of doing it ? Maybe with the use of extension methods ? ...

C# Capabilities?

Hello, I've searched high and low for a list of the contents of .net 3.0 and 3.5 framework, since i've been programming using old technologies such as hashtables instead of a dictionary(newer technology). I've been having a bit of a swat up and wondered where I can find a list of all the latest capabilities of C# and the .Net framework...

Where is the .net 3.5 SDK?

Can anyone please provide a link to download the .net 3.5 SDK? I checked the MS site and google but cannot find a download link for this. Thanks... ...

Asp.Net MVC - View -> Create 2 objects

First of all, I'm really new to the MVC Asp.Net ideology. I would like to know how can I create two objects (model) into one view ? because if I look at the view header it's inherit from one model : \<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> So, if, for example,...

Populating grid in C# 3.5

Yesterday i installed C# 3.5 and today when read topic here of "Accessing Google Spreadsheets with C# using Google Data API", and decided to try it out. So i decided to write a example, that: 1) get data feed of first Worksheet of first Spreadsheet, that name contains string segment that user inserted 2) fill grid with data Well i got...

Dynamic Route Creation thru Xml File

I'm loading a special set of routes form an XML file. Those rotes must be created in my application for compatibility reason with the previous version of my application. Initially, the first version where wrote in .net 1.1, and I must create some routes to fully support "old" urls to the new ones. The application has been full rewrited ...

Nullable types in .net

Why does properties[5].PropertyType.GetGenericTypeDefinition() == Type.GetType("System.Nullable`1") equals to true while properties[5].PropertyType.GetGenericTypeDefinition() == Type.GetType("System.Nullable") equals to false? Properties[5] being a public Nullable<DateTime> field. What does the `1 after the System.Nullabl...

C# - Custom Attributes

Hi! I want to log all calls to all class methods with a specific attribute. How would i do this? This is what I have so far: class ExecutionLogAttribute : Attribute { } public class Human { private Int32 age; [ExecutionLog] public void HaveBirthday() { age++; } } What would now be the best way to log al...

Reflection performance for Data Access Layer

Hi all, I had created a framework for a project in the past that one of it’s functionalities was to load the Database info into my business entity classes (only properties no methods) and from the Business entity classes to the database loading the parameters collection of the stored procedure to be executed. To this on that project I d...

Crystal Reports doesn't show any data

So I'm using this SQL Server with my application and I decided to display crystal reports to the user. I'm not at all experienced with crystal reports, but this project gives me a good opportunity to learn. Now, my data sources are already setup and i've been using them with for the past several months with this project. However, when I...

ASP.Net ViewState Compression: Should I bother?

So basicaly I am working on a site that is attempting to be optimized for phones (This includes pretty much any browser enabled phone) Due to the nature of the site, I want it to load as quickly as possible. At this point, I think the page is around 30k or so in size. Now I am using viewstate, mostly for things like datagrids and not ...

WCF webservice stop working after upgrade to framework 3.5 sp1

I have a wcf webservice on one of my testing servers. Everything worked fine until I upgraded frome framework 3.5 to 3.5 sp1. the wcf web service stoped working and returns the error: "Failed to invoke the service. The service may be offline or inaccessible. Refer to the stack trace for details." "The remote server returne...

Set Monitor DPI in WPF

On my PC the default DPI is 96dpi, but I want my WPF application to be scaled on 120dpi, is there any way to do that ??? PS: I don't want to change PC settings ...