I need to create a section of our website where there is a main box of content with 3/4 smaller boxes (previews) underneath. Please take a look at http://espn.com for an example. They have a main top box for content and then it shuffles between the content previews below.
What is the best way to do this? We are using .NET framework.
...
I've got an error page here SiteError.aspx and it's configured correctly in the web.config to go there when unhandled exceptions are encountered.
I want to use this page to log the exception that triggered it as well because I only want to LOG the errors that the users encounter (i.e. if SiteError.aspx is ever hit.)
This is the code I ...
The problem: Registered event handlers create a reference from the event to the event handler's instance. If that instance fails to unregister the event handler (via Dispose, presumably), then the instance memory will not be freed by the garbage collector.
Example:
class Foo
{
public event Action AnEvent;
pu...
All of a sudden I'm getting the following error on my website. It doesnt access a db. just a simple website using .net 2.0.
I did recently apply the available windows server 2003 service packs. Could that have changed things?
I should add the error randomly comes and goes and has been doing so for today and yesterday. I leave it for ...
The class library I'm refactoring has a large number of events (over 50) each with its own Delegate, even though many have the same arguments. I starting switching them all over to use EventHandler and custom EventArgs but it is proving to be tedious and time consuming.
Is there an easier way to handle a situation like this, when you ha...
We currently have a .NET 2.0 web app that uses forms authentication via cookies. Associated with this web app is an old VB6 client application that has its own login system.
Currently, the users have to login to the VB6 app, and then when they click on a link, need to authenticate themselves again with the .NET forms authentication sys...
From the MSDN articles I've found -- http://msdn.microsoft.com/en-us/library/aa394515(v=VS.85).aspx -- Win32_Volume and Win32_MountPoint aren't available on Windows XP.
However, I'm developing a C# app on Windows XP (64bit), and I can get to those WMI classes just fine. Users of my app will be on Windows XP sp2 with .Net 3.5 sp1.
Goo...
I'm looking for the following features:
Scheduler uses SQL Server as the backing store
Tasks can be scheduled by one application and executed by another
I can have multiple applications, each of which handles a specific subset of tasks
Tasks can be triggered at specific times, now, or based on the success or failure of other tasks
Data...
I've got an MVC web application with associated controller tests that run under a TFS build as per normal.
I can see the tests running and passing in the build log and they appear in the "Result details for Any CPU/Release" section of the build
I also have a number of other assemblies with associated tests that are running in the same ...
I make a compiler of Tiger and I want integrate with VS2008, but I read a lot of stuff and don't say very well how I can made that. What is the type of the project that I need to make? How I register my Language/compiler in VS2008, I know that I need install the SDK, I know little thing that I need to do but the steps more important, lik...
In this answer, I described how I resorted to wrappnig a GZipStream around the response stream in a HttpWebResponse, in order to decompress it.
The relevant code looks like this:
HttpWebRequest hwr = (HttpWebRequest) WebRequest.Create(url);
hwr.CookieContainer =
PersistentCookies.GetCookieContainerForUrl(url);
hwr.Accept = "text/...
The code:
using (XmlReader xmlr = XmlReader.Create(new StringReader(allXml)))
{
var items = from item in SyndicationFeed.Load(xmlr).Items
select item;
}
The exception:
Exception: System.Xml.XmlException: Unexpected node type Element.
ReadElementString method can only be called on elements with simple or empty content...
A few months back I put together a simple proof-of-concept piece of software for a small firm with an idea for a document editing tool. The company wanted this tool to be integrated into Microsoft Word, understandably, to maximize its accessibility to the average user.
I essentially wrote the underlying library with all of the core func...
Hi all,
I have a Category entity (class), which has zero or one parent Category and many child Categories -- it's a tree structure. The Category data is stored in a RDBMS, so for better performance, I want to load all categories and cache them in memory while launching the applicaiton.
Our system can have plugins, and we allow the plug...
I have to set up an XML "web service" that receives a POST where the 'Content-type header will specify “text/xml”.'
What is the simplest way to get the XML into an XDocument for access by VB.NET's axis queries?
I don't believe the web service is guaranteed to follow any protocol (e.g. SOAP, etc); just specific tags and sub-tags for var...
Hi
The major subject in .net programs is "How manage memory for best performance".
so Microsoft use garbage collector in .net and with that, we don't need to do something for managing memory(or better say we can use GC easily)
But when you develop big project(business app), you make too many tables and database for your own project. s...
Hi all,
How do i inherit a property in c# from an interface and give that property other name on the class?
For example:
public interface IFoo
{
int Num {get;set;}
}
public class IFooCls : IFoo
{
int Ifoo.Num{get;set}
}
In this case, what the property name in the interface is also the same in the class. What i want is to give...
if we supposed that "A.B." is a value for an xml element called given-names
the following code converts this value to "A.tempspacetempspaceB." instead of "A. B."
foreach (XElement initial in doc.XPathSelectElements("//given-names"))
{
string v = initial.Value.Replace(".", ". ").TrimEnd(' ');
initial.SetValue(v);
}
So why temp...
Hi,
is it better to declare Webservice class object instances as static as the .asmx webservice classes have only static methods.
what i want is that i declare and instantiate webservice asmx class as static in aspx Page Behind Class.
and on every event call on that page i could perform operation against webservice methods.
is it ben...
I have a enumerator which map to a bunch of int
example
enum MyEnum {
Open = 1,
Closed = 2,
Exit = 4
}
I find though that when I want to assign this to an integer, I have to cast it first.
int myEnumNumber = **(int)** MyEnum.Open;
Is it possible to specify the type of an enum so that it is implicit that there is a integer assigne...