I have some HTML markup in my ASP.NET master page representing a basic navigation menu. THree words that link to three pages. My CSS and HTML are included below for your reference.
When I load the page, the links appear with the correct color (red). If I hover over a link, the link changes to the correct color (blue). So far, we're good...
I'm writing components of a .Net 4.0 web solution (on IIS7, WS2008), and need to provide a service which can consume messages from a message queue. I've found setup examples for configuring WAS service activation using MSMQ... but we aren't using MSMQ (using RabbitMQ) and I'm pretty sure I'll have to implement some kind of listener of m...
I'm trying to get to the code behind the Serialize() method in the .NET framework but despite having followed all the steps on the Hanselblog (and the ones that he references) it's not happening for me.
I'm running VS2010 Ultimate on x64 Win7 and would appreciate any help that anyone can give.
EDIT: 2010-08-31
I flattened and rebuilt m...
I noticed that you can change the target platform in .NET applications to the Client Profile or the Full profile. What is the difference between the two? How should I choose which is the correct one for my project?
...
I'm run into a really interesting .NET 4.0 installer issue. I have a small program that is targetting .NET 2.0. I'm running Win7 x64, which has .NET 3.5 pre-installed. After I install .NET 4.0, the program stops working. It's trying to use a function that was deprecated in .NET 4.0, but according to various articles I've read, the in...
Hello. I have a c# control class inside of a dll, then this control is embedded in a web page in an asp.net application by using the object tag. When the dll is compiled with .net 3.5 sp1 and the web application also runs in .net 3.5 sp1, the code works fine. But when the dll is compiled in .net 4.0 and the web application runs in 4.0, ...
I have the folowing code to fetch a record and update one column which is of type NVarchar(Max) using Linq2Sql.
using (var context = new DataClasses1DataContext())
{
var entity = context.Entity.Where(d => d.ID == 12).Single();
entity.EmailTemplate = "Test Template";
context.Sub...
Hi All,
I have been working away for EF4 and got a lot of stuff done and its working really nicely, the one problem I do have is: Context.CreateQuery returns correctly, but it is also loading ALL its related entities too!?
Which is going to cause massive issues once the DB actually has real data in there.
Any ideas on how to stop it ...
Does anyone know if there is an SDK for the .Net 4.0 framework, and if there is one, where does the installer put it on the hard drive? I've installed the Ultimate Edition of Visual Studio 2010, but can't find the SDK anywhere.
...
In my project I have the following helper method, which goes through all the assembly and gets all types that are subclasses of the BaseCamaFrom type.
public static List<Type> GetAllTestActionFormTypes()
{
List<Type> types = new List<Type>();
// add all the types that are subclasses of BaseCamaForm to the _camaF...
I just realized that DataContractSerializer expects nodes in the alphabetical order or the specified order. Is there any way i could make it NOT do it?
TIA
...
If the Covariant type parameters which added in .Net Framework 4 enable me to make assignments that look like polymorphism
Why I can write
IEnumerable<object> lst = new List<string>();
And I can't write
List<object> lst = new List<string>();
...
I use following code:
protected object GetProperty(object target, string fieldName)
{
Type type = target.GetType();
PropertyInfo mi = type.GetProperty(
fieldName, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
object obj = mi.GetValue(target, null);
return obj;
}
It works in .NET 3....
Hi all,
I've got a method which takes some parameters and generates some XML to be sent to an [archaic] web service.
I need to include in the XML:
Date (yyyy-mm-dd)
Opening time (hh:mm)
Closing time (hh:mm)
Now in the past when I've had to provide a date/time separately, I've taken in a single DateTime parameter and for...
I tried rebuilding but it seems that the edmx file doesn't update itself with the changes I made. Any suggestions besides removing the edmx and remaking it?
...
Hi, is there any possibility to create a maproute which would use always one method and it won't be necessary to put it in address?
I mean I've got controller with one method (Index) and it displays items depend on methods argument.
public ActionResult Index(string TabName)
{
var tab = (from t in BlogDB.Tabs
...
Ever since we upgraded to .Net 4.0 and VS2010 (from 3.5 and 2008) we can no longer get intellisense on LINQ to kick in when working in our views. Before the upgrade everything was working fine, but after the upgrade it's actually listed as an error when we try to use things like .Where() on a collection. Oddly it will compile fine and ru...
Possible Duplicate:
Encrypt/Decrypt string in .NET
I've been searching all over Google for a simple way to do this, but they don't work in C# 4.0 which I'm using. I have a textbox where i input the string i want to encrypt, and then it encrypts that text and displays the encrypted version of the text on a label. Then, they put...
Expected output & output I get in debug mode, and release mode under VS2010, .NET 4.0:
bar construct
main
Output in release mode not under the VS2010 debugger, and under WinDbg:
main
Program does not exhibit this behavior on VS2005, .NET 2.0
using System;
namespace static_init
{
public class bar
{
public bar()
...
I have a list of string that I am writing out to a CSV file. I write this file like so:
FileInfo outputFile = new FileInfo("c:\output.csv");
StreamWriter writer = outputFile.CreateText();
StringBuilder line = new StringBuilder();
// List<String> listOfItems = ...
for (int i = 0, j = listOfItems.Count; i < j; i++) {
line.AppendFormat(...