I have an update action in a controller that performs an UpdateModel. Before I pass the data back to the view I want to log the properties that failed to validate.
I expected the dictionary where the errors are stored to be in the ModelState (since the method AddModelError() is there) but this doesn't seem to be the case. How can I ac...
They seem to be equal. Can both have multiple keys separated by a comma.
...
Here's my situation. I have a DotNetNuke application. I want to link to an existing ASP.net website from within the DNN website, and have decided to use DNN's IFrame for that.
The existing ASP.net application uses Forms Authentication for security - only authorized users can access the pages. This asp.net application also requires...
Hi all,
This may be the most mysterious problem I've ever encountered.
We have an IIS7 install with 3 Web Sites on it, each with it's own Application Pool. Once a day, for about an hour, a specific one of them goes down.
What I mean by "goes down" is:
It stops responding to requests for dynamic pages (ex. default.aspx) but will ser...
I need to get a string from resource file of page from utility class.
I tried
ResourceManager resources =
new ResourceManager(
"Company.Application.Folder.App_LocalResources.Page.aspx",
Assembly.GetExecutingAssembly());
string value = resources.GetString("ResourceName");
...
I have a utility class that takes a generic list as a parameter.
Code looks like:
Function DoStuff(collection as Object, elt as Object)
...
collection.Add(elt)
...
End Function
This is called with:
DoStuff( List(Of Foo), new Foo() )
DoStuff( List(Of Bar), new Bar() )
There are about a dozen different types.
Currently, pa...
Hello,
Say I have a project that I am deploying at
www.foo.com/path1/default.aspx
and
www.foo.com/path2/default.aspx
What would be the most reliable way to know if I was in the folder "path1", or "path2"? Can I grab that directly, or do I need to split() somehow on the Request.Url.AbsolutePath, or... ?
I just want to change co...
I would like to display the size of the file that was chosen via the Browse button of the FileUpload control.
Ideally, this value is displayed immediately after the user chooses the file but BEFORE the "Upload File" Button is clicked.
I have and on a webform. The Button looks like this:
<asp:Button ID="UploadButton" runat="server"...
I almost figure this out, can anyone tell me as to why my $.unblock never executes?
$(document).ready(function() {
$('#somedropdown').change(function() {
$.blockUI({ css: {
border: 'none',
padding: '15px',
backg...
I am trying to find all possible ways I could improve my website performance. I was considering enabling dynamic compression at the server level but was concerned by performance hits (no caching of compressed pages - corruption of files - overhead on the server).
Should I just give up on the dynamic compression with IIS 7? are there modu...
We are using the AspNetSqlMembershipProvider control to generate new passwords.
Is there anyway to turn down the complexity of the generated passwords? By default it is outputting things like this: *f.;tp{h|[hPCF
I realize I could roll my own password recovery process if I have to, but I'd like to avoid that.
...
I'm using routing in asp.net to get nice URLs
When I define routes in global.asax I create two distinct routes that use the same controller (c#):
// Setup code for route a...
routes.Add("routeb", routea);
// Setup code for route b...
routes.Add("routeb", routeb);
(How) is it possible to determine from...
I have to make a delete button for a simple intranet forum. I would like to have a javascript alert box (or equivalent) asking for confirmation when deleting posts. However, I've found it difficult to get the result of the javascript confirmation box to feed into the code-behind. Is this even possible? Or do I have to use another sor...
I'm following this walkthrough:
http://msdn.microsoft.com/en-us/library/879kf95c(VS.80).aspx
In a machine running vista ultimate, I have installed:
IIS
SQL Server Express 2005
Visual Studio 2005
I created a new website and I can access it ok via http://127.0.0.1
but I want to learn to create a login and have user memberships.
W...
Is there a way pass values from other controls (e.g. "selected value of dropdownlist", "value from query string") to a User Control using a property within the tag itself and NOT from the code behind?
...
I need to save the full and exact HTML sent to the browser for some transactions (for legal tracking purposes.) I suspect I am not sure if there is a suitable hook to do this. Does anyone know? (BTW, I am aware of the need to also save associated pages like style sheets and images.)
...
This code streams large files to our users:
// Open the file.
iStream = new System.IO.FileStream(filepath, System.IO.FileMode.Open,
System.IO.FileAccess.Read, System.IO.FileShare.Read);
// Total bytes to read:
dataToRead = iStream.Length;
// Read ...
I am trying to create an html attachment by processing some of my xml through an xsl transform and sending it to the client. If I click "open", IE shows the html properly, but if I save the attachment and then open it in Firefox, every place there was a I'm getting a "Â" character. I have a feeling this has to do with our encoding. Her...
Short Version
I want an ADPlus script that will do a full memory dump on the first-chance StackOverflowException, before anything is cleaned up, and ignore all other exception types.
Log Version
After a release of new ASP.NET code, we started getting intermittent StackOverflowExceptions. We've looked for infinite recursions and all t...
I have created an IEnumerable list of racing drivers using LINQ from a string array as such below:
string[] driverNames = {
"Lewis Hamilton",
"Heikki Kovalainen",
"Felipe Massa",
"Kimi Raikkonen",
...