I am converting a webforms app to mvc. I implemented localization in webforms this way: The user selects the language, which BTW can be an rtl language, and the selection goes into the user profile in order for it to persist the next time the user visits the site. I used anonymous profiles. also, I used resource files.The db tables have multiple rows for each language (with a language index field). I also used different style sheets for ltr and rtl languages since I don't use tables on my site (Is there another way instead of using separate style sheets?) What are the best practices for using localization in asp.net mvc ? can I and should I use resource files ? and profiles ? should I map the aspnet tables to linq-to-sql ?
I know the difference between ASP.NET webforms and ASP.NET MVC and I've seen quite a few videos explaining that they both run on top of ASP.NET (and I've used both). However, my question is, how would one develop right on top of ASP.NET without webforms or mvc.net?
If I use a Server.Transfer command with a true value passed for the "PreserveForm" 2nd param's value:
Default.aspx:
Server.Transfer("WebForm1.aspx", True)..I can access the value of the textbox "TextBox1" control on the first page, Default.aspx, from "WebForm1.aspx" as follows:
Possible Duplicates: Advice on using ASP.net WebForms or MVC, How to decide which is right, WebForms or MVC when doing ASP.NET
I am new to web development and asp.net... I was going through asp.net website and 'n' number of question here in stackoverflow regarding Webforms or MVC.... But still as a beginner can't get an idea what to choose?
What should i choose webforms or mvc?If MVC,What should i know before getting started with it?If webforms,What should i know before getting started with it?
I want to use "NVelocity" from plain ASPX pages without using any MVC framework. I don't want to use "NVelocity View Engine" thru' asp.net MVC framework. The only example that I got for "NVelocity" is for merging and writing onto console window (http://www.castleproject.org/others/nvelocity/usingit.html)
I am looking out for example on to integrating "NVelocity" into aspx web forms.
I have a mixed project: WebForms with ASP.NET MVC2 and is running OK. I have done this tutorial on separate MVC Project and localization is working fine. However, when I want to apply localization (mentioned above) in my mixed project, it seems to be ignored. It doesn't matter what I set in global.asax file (de-DE, fr-FR, pl-PL) always get en-EN or en-GB. This is really strange. web.config is correct and doesn't force the localization.
I am developing a simple application. I have completed.
1 - Using Respositary Pattern
2 - using DataAnnotation for validation.
3 - Selecting, Creating, Updating and Deleting.
My Questions.1 - I have extra BL validation. Should I create Service layer or use that in Partial Class where my DataAnnotation is? I dont want to use DataAnnotations in one class and other BL validation in another class. Is there a way to combine both or Should I use those separately. Confused here? Any examples to implement BL.
2 - I have lots of Calculations to run once record is reterived and insterted. Where I put these calculations? Should I make extensions and call in controller or Methods in separate file. Any clean approach.
3 - Can I use Repositary Pattern and Service model in ASP.NET webforms with ADO.NET, Entity Framework and Linq to sql?
4 - I don't know id this is stupid question. Can we use ADO.NET with DataAnnotation somehow in Webforms and ado.net with mvc?.
i know ASP.NET and i would like to learn and make a new project in ASP.NET MVC. Is it easy to move from asp.net to asp.net mvc? Will the knowledge i have so far be helpful? Im asking because i will have only few days to learn asp.net mvc and i want to know whether it's possible.
I have a completed app running in a QA environment. Everything works fine under most circumstances.If you hit a plain URL (no identifying information in the URL), you see an intro page with a button (generated by an asp LinkButton control) that posts back and directs you to another page. The markup looks the same when it fails and when it doesn't.
When such a URL is followed from, e.g., Word and the default browser is IE, the intro page loads fine, but clicking the button causes an error. When not debugging, this behavior occurs every time. While debugging, the error occurs only ~ 1 in 10 times (closing the browser instance and starting over every time).When the error occurs, the intro page Page_Load fires and IsPostBack is false. Somehow, instead of a post, a get is being issued.
When I run fiddler to try to analyze the actual calls (can't use firebug because it never happens using Firefox), everything works every time.I don't know whether this issue has anything to do with routing, and I've no idea even what to look at next. The strange thing is, when I debug, the intro page doesn't fully load every time. Only about 1 in 3 times does it fully load even if I've just cleared browser cache. When I run it through fiddler, it fully loads and works fine every time.
In my master page I tried to do the following: <asp:HyperLink ID="asdf" runat="server" NavigateUrl='<%= GetRouteUrl("about-route", new {}) %>'>Test</asdf> I got a compiler error: Server tags cannot contain <% ... %> constructs. What is the proper way to create a route URL in a server control in Web Forms? I also need to include it in the following:
I am using the asp.net with c# and using the update pannel, i am getting the error sometime not all time and no page navigate after then .
following is the massange on the pop up window:-
"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0"
I am using the asp.net with c# and using the update panel(ajax), i am getting the error sometime not all time and no page navigate after then .
following is the massange on the pop up window:-
"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0 or 500"
I currently work for a company that uses a combination of ASP.NET Webforms and legacy ASP pages for web development. This works fairly well for their current projects but I would like to convince / suggest to them to switch over to ASP.NET MVC since most of their codebase consists of wiring form elements to stored procedure parameters. Just using an ORM is also a possibility but I think it would be a good idea to use this opportunity to switch to an MVC framework.
However, I'm not sure how easy it will be to deploy an ASP.NET MVC app along side ASP.NET and Classic ASP code while the codebase is updated. First, I would like to ask if this is even possible. I've seen threads about running ASP.NET with Classic ASP and ASP.NET MVC with Webforms but not all three in the same application. They currently have Webforms and Classic ASP working together so the pitfalls associated with that are already solved.
I am developing a mobile site which has multiple divs. I have validator set up for each different input, but I want to validate only the elements within the 1st div on click "Continue."
In the example, I want to validate First name only within FirstPage.
With an existing n-tier web application using ASP.net WebForms what is the best approach to get TDD acceptance on the application. What is a good plan to gain acceptance by developers to move forward to write test first code opposed to ignoring the tests while the TDD implementation is in limbo?
Knowing there will be a large "in-limbo" time of low coverage:What areas of the model do you start writing tests for first? Critical use areas, or new development?
I have a c# asp.net web application in .net 1.1. The web application is a website in IIS and works online at the world wide web. There are very much customers all over the world of that website and everything works fine. There is one customer in germany where it doesnt work fine. When he press on a button "New" he gets a popup with the error:
[Code]....
In the past he didnt get this error. I ask this customer to check the website on another machine in his organisation, but he still get this error. So its something in the organisation. Some machine settings or network settings I think, because other customers didn't get this error.Someone know why this organisation get this error ? Is it possible that the problem is at the machine or network settings? Or something with the web browser version/settings?
I have few websites based on the WebForms and one based on MVC. All websites have the same settings for forms authentication in web config.
The problem is that once logged in to WebForms website, I have to re-login for MVC websites, but when I log out from MVC website, I am automatically logged out from WebForms websites.How can I pass information to the MVC website that user was successfully logged in when using WebForms.
I have an ASP.NET WebForms page with forms authentication. When users create a login, I use 'remember me' to create the authentication cookie.
What I now want to do is check the time of their last access. But LastLogin time is updated only when the user uses the login control (which they don't need to use when they have the authentication cookie on their machine), and LastActivity control is updated before any of my code runs.
It looks like the only way I can do this is to hook into the application event Application_AuthenticateRequest - right? Or is there some better way to do this?