I have an ASP.NET 4 WebForm with 4 dropdowns in a table.
<table>
<tr><td><asp:DropDownList ID='dd1' runat='server' /></td></tr>
<tr><td><asp:DropDownList ID='dd2' runat='server' /></td></tr>
<tr><td><asp:DropDownList ID='dd3' runat='server' /></td></tr>
<tr><td><asp:DropDownList ID='dd4' runat='server' /></td></tr>
</table>
In...
How can I pass two querysting parameters in URL routing using ASP.NET 4.0?
I have gone through many articles, but everywhere it shows only one parameter.
I'd like the display URL to be:
http://www.mywebsite.com/reports/1-this-is-my-first-report
The first parameter is ID: 1
The second is Name: This is my first report
I am trying fol...
Hi,
I have a problem. We recently migrated our web site solution from asp.net 3.5 to asp.net 4.0. The web site have a web service that I have added a new method to.
On my local machine (Windows 7, VS 2010,.NET 4.0, IIS 7.5), I have no problem browsing our web service when I use the Visual Studio Development Server, but when I check the...
Hi, I use this code to create thumbnails and then store the original and the thumbnail into a DB. It creates tn that are always of a fixed sized and if the original image is wither than it's higher it is cut and then resized to the fixed size.
The code is working however I would really appreciate some help modifying this code to do the ...
hi i have implemented URL routing in asp.net 4.0 using following route.
routes.MapPageRoute(
"NewsDetails", // Route name
"news/{i}/{*n}", // Route URL
"~/newsdetails.aspx" // Web page to handle route
);
which gives me url like
http://www.mysie.com/news/1/this-is-test-news
Which is...
I am building an asp.net site in .net framework 4.0, and I am stuck at the method that supposed to call a .cs class and get the query result back here is my method call and method
1: method call form aspx.cs page:
helper cls = new helper();
var query = cls.GetQuery(GroupID,emailCap);
2: Method in helper class:
public IQueryable<V...
Hi,
I have a form where users are able to upload images to the website. The images are stored, binary, in the table. I use ajax and jquery on the site and it is never reloaded so when a users enter the data and push submit the page is not reloaded instead I use ajax to upload the the data to the server.
When i just passthrough text it...
I have an ASP.NET 4 WebForms application which is using routing. I would like to catch the 404's for routes that do not exist:
RouteTable.Routes.MapPageRoute("404", "{*url}", "~/error");
Problem is, this will also cause a mapping to /error for pages like ImageHandler.ashx and Resource.axd.
So I add this:
RouteTable.Routes.Ig...
I have an ashx file which returns a localised message. This is called from an Ajax request. I need to access the Asp.net ResourceManager in the ashx file.
...
I have an ASP.NET 4 WebForms Web Application which is using Routing. I have URL's like this:
http://website.com/product/123/name
To use querystrings I made this route:
product/{pid}/{name}/{*queryvalues}
And I thought, instead of using normal querystrings like ?queryitem=value&item2=value2 I made this:
http://website.com/product/1...
Hi,
I'm trying to implement SWFUpload for uploading images on my page. The file-path is stored in a table with a unique id as key and the file is store on the server with a new filename. I need the id or the filename to be returned so that I can access that information when I later-on need it. Is this possible and how is it done? Maybe ...
I am having some issues with deploying my MVC 2 application on a IIS 6 server.
I have the following project structure:
/
App/
Controllers/
Helpers/
Infrastructure/
Models/
Views/
Public/ # This folder contains CSS and JS files
Global.asax
Web.config
I have a custom System.Web.Mvc.We...
Whenever I add this line to my web.config in the system.webServer section:
<serverRuntime />
With our without properties, IIS 7.5 just serves up a blank page instead of the website. I created a new empty Web Application using IIS and added the line to the web.config; blank page.
What am I doing wrong?
...
I just can't seem to get GZIP compression enabled for my ASP.NET 4 application. Only javascript files seem to get compressed. The page, css and others dont get compressed.
The response header of a not compressed CSS file is:
Content-Type text/css
Last-Modified Mon, 09 Aug 2010 20:10:34 GMT
Accept-Ranges bytes
Etag ...
How can you hook on to an event that gets fired directly after the Routing / mapping is done? I want to perform some actions directly after the Routing is done and the mapped URL is available.
I tried PreRequestHandlerExecute, but that event is fired just before the Routing takes place. I can't find any other place. PostRequestHandlerEx...
I have a site which is running in ASP.NET 4.0, on Windows 7 Ultimate.
It is using FormsAuthentication, with a nice little logon page, all of which is fine so far as logging in and authenticating.
What is NOT working okay though is directory authorization overriding in sub-directories.
I want both authenticated and non-authenticated u...
Hi Folks,
We have a ASP.net 2.0 web app with an installer which appears to hit an issue with .Net Framework 4.0. This has occurred on XP and Windows 7. Seems to happen every time.
During the installation, we call aspnet_regiis for various tasks such as encrypting the web.config. If .Net 4 is installed this throws the error:
aspnet_r...
I'm using the new Razor ViewEngine with ASP.NET 4/ASP.NET MVC 3.
In both Cassini on my local machine (Win7 x64/VS 2010), as well as IIS7 (Windows Web Server 2008), I'm randomly getting "Could not load file or assembly" errors.
With Cassini, rebuilding the solution generally fixes the problem.
In IIS7, recycling the application pool ge...
I have the following Extension Method
Imports System.Runtime.CompilerServices
Namespace Extensions
Public Module IntegerExtensions
<Extension()>
Public Function ToCommaDeliminatedNumber(ByVal int As Integer) As String
Dim _input As String = int.ToString
Select Case int
Case I...
I have made a custom Route which override GetRouteData. How can I know what type of request is being done? Everything passes the GetRoutData function (.css, .js, .axd, etc) and I would like to do something only if it is a System.Web.UI.Page.
But httpContext.Request.CurrentHandler is always null because the routing takes place just befor...