How to clear the Text on Clear button using JQuery
Hi I have a clear button that needs to clear the TextBox value(that is entered) on this button click using JQuery function. ...
Hi I have a clear button that needs to clear the TextBox value(that is entered) on this button click using JQuery function. ...
Hi, I would like to have images, css, and javascript cached client-side on their browser when they load up a web page. There are so many different types of caching I am confused as to which ones to use with asp.net mvc. Would it also be possible to have their browsers check for new or modified versions of these files? Thanks! ...
ASP.Net MVC 2.0 will be released in a few months. There are some bug fixed and some new features. Which feature is more useful for you and you will use more? ...
So in my mvc project's Project.Repository I have [MetadataType(typeof(FalalaMetadata))] public partial class Falala { public string Name { get; set; } public string Age { get; set; } internal sealed class FalalaMetadata { [Required(ErrorMessage="Falala requires name.")] public string Name { get; set; } ...
As you know, <%=Html.ActionLink("Back to List", "Index") %> generates html like this : <a href="/Content/Index">Back To List</a> But I need just href part. I will use it in JS code and I do not want to write manually. Can I gerenate what I need part ? ...
Still not comfortable with all the enumerables out there. I'm trying to do this: Assert.IsTrue(actionResult.ViewData.ModelState.IsValid, null, Enumerable.ToArray<object>(actionResult.ViewData.ModelState as IEnumerable<object>)); It's an mbUnit assert with the following signature. public static void IsTrue(bool actualValue, string me...
Hi, Could anyone tell me why a problem in the noun model would not be caught by this try catch? I have tried this on two different controller methods now, and both times, even if the linq2sql doesn't allow the data to be saved, the code never jumps into the catch block. I've watched the noun object in the middle of the trace, and the ...
Our designers have come up with button styles for an application which require the addition of <span> tags inside the <a> tags of our links. In ASP.NET we implemented this by adding an App_Browsers entry for Link Buttons. How would I go about doing this in ASP.NET MVC? I've contemplated creating my own versions of all of the various H...
Perhaps this is impossible, but I figured I would ask anyway. I'm working on an ASP.NET MVC application that uses jquery/AJAX extensively. One of the AJAX tasks that gets performed is a call to controller action that returns a URL to redirect the user to. What I would like to do is to have the same controller context when making an AJAX...
We have an application here which is using postsharp to wrap certain methods within a transaction aspect derived from MethodInterceptionAspect. We use NHibernate 2.0 as an ORM for the application. There is a failure within this block of code, public override void OnInvoke(MethodInterceptionArgs args) { using (TransactionScope trans...
I'm trying to do a site like http://example.com which goes to my SignIn action located at the Account controller. After signing in, I want to redirect to something like http://example.com/id where id is the user's ID. I already have this code in my Global.asax.cs. routes.MapRoute("Login2", "{bg}/{controller}/{action}", ...
bascially, how should i do it now that using the asp:listview control is out of the question? i am migrating from webforms to mvc and former implementation was in <asp:ListView...> so how should i do it now in terms of best user experience for the user? ie: i will need to ajax everything. thanks ...
How can i get private pages of my web site being crawled and indexed by google ? maybe it's not very "conventionnal", but i want my private page "links" displayed in google index, but next require a registration to display the page. ...
This seems like a very basic feature to me. I can't seem to set C# as the default programming language for Visual Web Developer 2008 Express Edition. I've searched and searched and found nothing useful. Any ideas? The reason why MVC is tagged is because it auto generates controllers and all that jazz -- in the wrong language. ...
My ASP.NET MVC application prevents CSRF attacks by using the ValidateAntiForgeryToken attribute and calling Html.AntiForgeryToken to write a hidden input element with the token value, and also place the token in the cookie. My exception log is reporting occurences of HttpAntiForgeryException that look like they were triggered from vali...
Hi guys I have a base controller that I use to return basic views like this. public ActionResult Index(string pageName) { return View(pageName); } public ActionResult LanguageSpecific(string ul, string pageName) { var result = View("sv/" + pageName); return View(...
I'm writing asp.net mvc web application that uses a large number of .jpg files that are on a share folder outside the web server and not accessible via http protocol. How can I place image path inside img tag? ...
i see the convention is to have the post action be the same name as the page but to put a: [AcceptsVerb.HTTPVerbs.Post] on the action method. Is there anything wrong with have the post action be another name. So if i have a page called Edit, the Edit action will display that page, while the "Update"action will post the edit changes....
I need to implement back functionality in my project, for this what i am doing that i am maintain last url in ViewData["RetUrl"] and on next page i am getting previous url from that ViewData["RetUrl"].on this way i had implemented this functionality.This idea is failed when level of pages increased i mean page1>page2>page3, no way to bac...
I have a business requirement to enforce a check box on a HTML form to be marked as true before allowing submission of the form. I can return the user to the form if this box has not been checked with an appropriate message, but want to return all information from an xVal validation of the form data at the same time. I can't find any i...