Is it possible, from within ASP.NET MVC, to route to different controllers or actions based on the accessing device/browser?
I'm thinking of setting up alternative actions and views for some parts of my website in case it is accessed from the iPhone, to optimize display and functionality of it. I don't want to create a completely separate project…
I'm working with ASP.NET AJAX and want to understand the difference between these two snippets:
function pageLoad(sender, eventArgs) { }
and
window.onload = function() { }
Do they act the same?
Or is one called before the other?
Or will one be called automatically and the another not?
On my Windows Vista, it takes a full 12 minutes to install the .NET Framework 4.0.
a) Is this normal?
b) If not, can something be done about it?
The reason I'm concerned about the speed is because it slows down the testing of our product installer considerably. Testing an installer is time consuming already, but this new .NET Framework…
On a Win7 SP1 32-bit machine, I initially had .NET 4 client installed and wanted to upgrade to .NET 4 full.
I downloaded the full installer dotNetFx40_Full_x86_x64.exe from Microsoft. After download the file showed 48.11MB, the correct size for the full package (vs. 41MB for the client).
I ran the installer and it first prompted to…
I developed an application that targeted .NET 4 the other day and XCOPY-installed it to a Windows XP machine. I had told the owner of the machine that they would need to install .NET Framework 4 to run my app and he told me he did (not a reliable source). When I ran the application I was presented with a message box that said this app…
The ASP.NET Routing framework allows developers to decouple the URL of a resource from the physical file on the web server. Specifically, the developer defines routing rules,
which map URL patterns to a class or ASP.NET page that generates the content. For instance, you could create a URL pattern of the form Categories/CategoryName …
Introduction:
WebGrid helper makes it very easy to show tabular data. It was originally designed for ASP.NET Web Pages(WebMatrix) to display, edit, page and sort tabular data but you can also use this helper in ASP.NET Web Forms and ASP.NET MVC. When…
I am developing a website using ASP.Net MVC 1.0. Can i host that website on a server having ASP.Net 2.0? Because my hosting provider supports only ASP.Net 2.0. Does anyone know how to host a website developed using ASP.Net MVC 1.0 in a web server supports ASP.Net 2.0
Ok, so the initial search in StackOverflow shows nothing related for this question. So here it goes:
Let's pretend for a moment that you're just getting started in a career in computer programming. Let's say that, for whatever reason, you decide to use the .Net framework as a basis for your programming. Let's also say that…
We have deployed a .net 4 asp.net site on IIS 6.0.
Default.aspx is configured as one of the default document.
When we access the site using the following url
http://testsite
We expect it to render
http://testsite/Default.aspx
But instead we get 404 Not found error. We did not had this issue when it was deployed on…
You can built sample application on ASP.NET MVC 3 for deploying it to your hosting first. To try it out first put it to web server where ASP.NET MVC 3 installed. In this posting I will tell you what files you need and where you can find them. Here are the files you need to upload to get application running on server where…
I am trying to understand the best way of implementing a DropDownList in ASP.NET MVC 2 using the DropDownListFor helper. This is a multi-part question.
First, what is the best way to pass the list data to the view?
Pass the list in your model with a SelectList property that contains the data
Pass the list in via…
[NOTE: I'm using ASP.NET MVC2 RC2.]
I have URLs like this:
/customer/123/order/456/item/index
/customer/123/order/456/item/789/edit
My routing table lists the most-specific routes first, so I've got:
// customer/123/order/456/item/789/edit
routes.MapRoute(
"item", // Route name
…
In our current ASP.Net Webforms application we have several composite/template server controls that only exist for a common look and feel. For example, we have a panel control that has a title, a place for buttons related to the contents of the panel, and of course the contents. How is this best…
1) user A goes to the site, creates an account, and logs in
2) user b goes to the site. Rather than having to log in, user b enters as though user b is user a. User b gets access to all of user a's data and can brows the site as user a.
Note: user b does not log in. User b just hits the site,…
I have an ASP.NET 3.5 page with an update panel and history enabled. It works fine when I perform async postbacks but I get problems when I want to perform a normal postback. The page load happens fine for the normal postback but then I get asynchronous page loads from the script manager which…
I am trying to understand the best way of implementing a DropDownList in ASP.NET MVC 2 using the DropDownListFor helper. This is a multi-part question.
First, what is the best way to pass the list data to the view?
Pass the list in your model with a SelectList property that contains the data…
I have single-thread windows form application written with VB.NET and targeting Framework 1.1. The software communicates with external boards through a serial interface, and it mainly consist of a state machine that run some tests, driven in a loop done with a Timer and an Interval of 50ms.
The…
I am not starting an argumentative discussion here and this post is not about career development, but from the commercial point of view:
If a company was using ASP.Net MVC as a main methodology to build their web sites and application.
However, ASP.Net MVC takes more time to show a functional…
I'm just wondering, if I have an ASP.net Web Application, either WebForms or MVC, is there any situation where doing stuff asynchronously would make sense?
The Web Server already handles threading for me in that it spins up multiple threads to handle requests, and most request processing is…
I’ve taken over the completion, deployment, and maintenance of an ASP.NET Web site that generates Office documents using VSTO. VSTO’s a decent concept and works fine for small-scale scenarios like a desktop app or small intranet. However, with multiple simultaneous requests via ASP.NET, we…
Hi Experts,
I am using asp.net 3.5 and C#.
I want to send mail from asp.net, for that I have got some details from my hosting provider
which are these:
mail.MySite.net
UserName
Password
But I am unable to send mail through these details, I have done the following changes in my…
originally published in CoDe Magazine Editorial Microsoft recently released the first CTP of a new development environment called WebMatrix, which along with some of its supporting technologies are squarely aimed at making the Microsoft Web Platform more approachable for…
I'm having a hard time finding information on what I expect to be a pretty straightforward scenario. I'm trying to unit test an Action on my ASP.NET Mvc 2 Controller that utilizes a custom input model w/ DataAnnotions. My testing framework is xUnit, as mentioned in the…