asp.net

Mail body parsing - open source mail client (PHP or ASP.NET)

Hi all. I have one interesting problem. I must parse mail body (regular expression), get some data from mail body, put this data to mail subject and forward this mail to another address. This must be done immediately when mail is received. Is any free WEBMAIL client that allow writing custom filter, or I must make application for thi...

asp.net impersonation

I am writing a web application that works with exchange, and so needs to impersonate an account that has admin rihgts to Exchange. This account is specified by the user on setup. What is the best way to get impersonation to use this account, obviously hard-coding this into the web.config won't work as it needs to be able to change, but ...

Registering custom webcontrol inside mvc view?

I am in the middle of a project where I am migrating some code for a website from WebForms to MVC - unfortunatly there's not enough time to do it all at once, so I will have to do some... not so pretty solutions. I am though facing a problems with a custom control I have written that inherits from the standard GridView control namespac...

Precompiled ASP.NET web application: error "System.Web.HttpException file filename.aspx has not been pre-compiled, and cannot be requested."

I've created a web deployment project using the template for Visual Studio 2008 for a ASP.NET 3.5 web application (not web site). I compiled the project which created the files needed for deployment. I copied the resulting folders (bin, static files and all folders with the aspx placeholders etc.) to a staging server where I wanted to t...

Protect ASP.NET Source code

Hey All, Im currently doing some research in how to best protect my source code so that no external parties can view and use my code. From browsing the web a few ideas have come to mind i.e 1) Publish website into a DLL 2) Code obfuscator 3) 3rd Party But none i find are really explained that well or shown in detail how to achieve ...

Understanding Postbacks in ASP.NET

For example, If I have a textbox with runat=server on a page, The value will be posted back to the server so I can access the properties in the code-behind. However, under the following situations, does it still hold true? A textbox with runat=server but does not appear in the function that is post back to. For example, a button is a...

ASP.net ViewState - Even when disabled, some viewstate exist. Why?

Even when on the page, the EnableViewState property is disabled, I am still seeing some viewstate existing on the page: "<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="VkBAB3n5LZYtY+nTzk1vEu1P/6QLf4qzFIKzpFRJe3DMf8UseUA/1RsO409HJX4QhkROSP0umoJvatjK/q+jXA==" />" My question is why? ...

I Can't see my dynamically generated RadioButtonList or CheckBoxList items after postback

Hi All, It's clear wehn I change any control and then posts back the SaveViewState method saves the changes and apply them agian after postback, see the folowing code notice that server-side-code put in a scrispt in my code liske this <% %> switch (myQuestion.QuestionType) { case 0: { rdlistAnswers.Items.Cl...

HttpContext and writing a component for both WebForms and MVC

I'm writing a component that I would like to be able to use in both MVC and WebForms web apps, but I'm not sure how to handle the differences between how HttpContext is handled. My component involves a custom IHttpHandler (for WebForms) or a custom ActionResult (for MVC). So I've got a few questions: Is there a way to use an IHttpHan...

ASP.NET Unit test woes (odd exception error)

I have created a new solution with a minimal amount of code that represents the issue I am having. This is the simplest I could get it down to. namespace EntServ.BusinessObjects { /// <summary> /// Summary description for EntServSession /// </summary> public class EntServSession { public EntServSession() ...

Infragistics Training

We are a somewhat advanced user of this technology but have had to learn it by trial and error. We are looking for formal training either online or instructor-led that is worth the cost. How is the vendor's offering? Any other recommendations? ...

LINQ to SQL, Stored Procedure problem handling an INT32 field that can also be NULL

I have a stored procedure that returns two int Values. The first can not be null but the second can actually return a null value. When I try to execute my stored procedure using LINQ to SQL it fails with the statement: "The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type." I tried t...

HTML Sanitization - bad markup?

I've been scanning some off the discussions on sanitizing HTML markup strings for redisplay on a page (e.g. blog comments). In the past I've just unilaterally escaped the markup for re-display. Does anyone know if there are any solutions out there that go beyond just removing "unsafe" tags? What if the markup is invalid? For example,...

asp.net: data put in session is available while working in internet explorer but not in opera

it's a really weird thing - i have a website that works perfectly in maxthon (internet explorer based browser). i started it in opera and found out that the data put in the Session dictionary on one site, is not available on the other... i mean i have Welcome.aspx, where when you click next the following code is executed: Session["ses...

Why am I getting null object reference error when saving (OnItemUpdating event) the first edit item in a ListView?

I'm getting the error "Object reference not set to an instance of an object." when trying to reference a HiddenField (lvEditProjectSteps_hdnStepStatusId for future reference) from the EditItem during the OnItemUpdating event after the Update event fires in a ListView. This only occurs on the FIRST item in the ListView. I checked the so...

ASP.NET AJAX and DateTime Format on the Client

So I've finally got my WCF service setup and talking to browser via ASP.NET AJAX. But I have found that when I populate a html table with my data... the datetime format looks like this: Fri Jan 02 2009 15:27:12 GMT-0500 (Eastern Standard Time) On the server I am using the .NET DateTime format. Should I use something else and do the wor...

ASP.NET MVC and JQuery get info to controller

I am totally confused on how to do ajax stuffs with jQuery and it seems the more I try the more confused I get. At this point all I want to do is get data to my controller using jQuery ajax. Some code for my jquery ajax call is. $(function() { $('#buttonAddLink').click(function() { var AjaxLink = { title: $("#li...

Check if ValidationSummary is Valid using OnClientClick

Is there a way to check if a ValidationSummary control has its IsValid property set to true using Javascript in the OnClientClick event of a button? What I'm trying to do is to show a message that says "please wait while your file is uploading" on an upload page, but if I use javascript to show that message, it shows up even when the V...

How to stop .NET from encoding an XML string with XML.Serialization

I am working with some Xml Serialization in ASP.NET 2.0 in a web service. The issue is that I have an element which is defined such as this: <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=True)> _ Public Property COMMENTFIELD() As String Get Return CommentField '...

Efficiency of persistence methods for large asp.net cache store

Curious if anyone has opinions on which method would be better suited for asp.net caching. Option one, have fewer items in the cache which are more complex, or many items which are less complex. For sake of discussion lets imagine my site has SalesPerson and Customer objects. These are pretty simple classes but I don’t want to be chatty...