Hi,
I have a JSON request that check to the server if a username has been already taken during the registration procedure.
This is the jQuery call:
// Instant check availability of the username
$("#txtUserName").blur(function() {
if ($("#txtUserName").val() == "") return;
$.ajax({
type: 'post',
url: '/Login/Chec...
$('#btn').submit(function () {
$('#btn').attr("disabled", "disabled");
setTimeout('enableButton()', 500);
return true;
});
function enableButton() {
$('#btn').removeAttr('disabled');
}
How can I submit the form in Internet Explorer?
...
Is it possible to host an ASP.net (MVC in particular, but I'm not sure if that's important) application from a self-hosted WCF service? I don't want to get into IIS, and I'd like to avoid something like Cassini if possible.
Sorry if this is a duplicate, it's really hard to find questions on this (everything is WCF on ASP, not the other ...
Hello,
I have a main screen with 2 parts a list and a detail section. Via a button, I open a modal dialog. On this modal dialog, 2 buttons one for save and the other for cancel. After the save, I call a function to refresh the list on the main screen and close the dialog. The problem, sometimes, the list is refresh before the end of the...
As I'm learning more and more about ASP.NET MVC the more I am introduced to Data Annotations.
Specifically in MVC they are used for validation and this gives me some concerns.
The biggest is due to the fact that I like to keep my model as POCOs and as clean as possible.
Now what if I have those model classes shared across multiple projec...
I thought it would be interesting if I could use the new MVC Razor View engine as a mail merge technology. It can still be part of an MVC website and does not have to be stand-alone console app.
Example:
string myTemplate = "Hello @Name, How are you today?";
ViewModel.Name = "Billy Boy";
string output = RazorViewEngineRender( myTemp...
I'm looking for a good solution to having a URL scheme that works for both standard ASP.NET MVC controller/action urls eg:
/Home/About --> Controller "Home", Action "About"
and vanity/slug urls eg:
/fred/post --> Controller "Posts", Action "View", User "fred", Post "post"
Importantly, I want the outbound url generation to work so ...
Hi Team,
I am a beginner to MVC and would like to know how I can set by binded model vaule back for viewing. Here is the example.
public class DataTypes
{
public Guid ItemID { get; set; }
[Required()]
public string Name { get; set; }
[Required()]
public string Status { get; set; }
[Required()]
public DataMod...
I am getting an odd error in an ASP.NET MVC (mvc dll version 2.0.0.0) project after the server is under load (50 to 100 requests per second) for a few hours and cache is approaching its memory limit. If I am reading the error log right (we use elmah) the MVC action parameter parser is failing before it gets to my controller's action.
...
I cannot figure out, how can a random, small sleep delay can be a solution to prevent an attacker from probing our site.
This is his code snippet:
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Security.Cryptography" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
void Page_Load() {...
I have this code in my view.
After my database adding the message is showing perfectly but my Grid is not showing the updated result. If I keep
return true;
when I click Submit button I am getting popup window immediately and then adding to the database? This showing my updated result in the grid.
...
I am using ASP.Net MVC2 and have a RSS feed for my blog. I am using out of the box functionality in System.ServiceModel.Syndication and Rss20FeedFormatter.
The feed works fine and can be read by Outlook as well as every browser I have tried. However when I submitted the RSS feed to google as a sitemap I got validation errors.
Out of cu...
I built this app with Web Developer Express 2010 using SQL Server Express 2008. I downloaded mdf/log files from my server to my local and attached them as a database with SQL 2005 compatibility.
I'm now trying to publish to my production server. The server is using SQL Express 2005 and Windows Server Web. I tried to change out the web.c...
I am using ASP.NET MVC and Entity Framework. I have an Edit Person web page where person's fields can be edited, then in the post back action, I use the following code.
var person = objectCtx.Persons.Where(s => s.Id == id).FirstOrDefault();
TryUpdateModel(person, form.ToValueProvider());
objectCtx.SaveChanges();
It works great. Howeve...
I have implemented Autocomplete and I'm having trouble with the label vs. value in the text box after the item is selected. When I type in a zip code, I see the label in the dropdown:
but after I select one, instead of the label showing in the text box, the value (which is the ID that needs to be saved to the database) is displayed:
...
Hello.
Is there a simple and clear example that shows how to use show/hide details about particular record feature of dataTables jQuery plug-in with MVC? If you have implemented this stuff and may share it with me, I would greatly appreciate it.
Thank you for your help!
...
i want that browser will accept request for only login page all other request should not be acceptable .
actually i don't want to check that user is login or logged out from site with Authorize attribute.
i just want to disable all requests of web pages(URL's) except login page from site.
something like:
routes.MapRoute(
...
Hi,
We have an editor template that contains approx 40 lines of jquery. I tried dropping this script into a <asp:Content> block to keep all of the javascript in one location within the page. However, I get the following error message content controls have to be top-level controls in a content page.
Is there any way to get this workin...
I'm building a jquery plugin for use in my projects in editing items in a table. When a user clicks on an item to edit, I do a pop-up form where they then save the data. When the save is successful I return the new data as a html row and replace the old row with this new returned row, but then I have to rebind the events. I can't figure ...
I am not sure if I have this right ... but can anyone point me to a resource that shows how to create a custom container in ASP.NET (Specifically MVC). By container I am talking about a container that is globally available during a session like a DI container (i.e. Ninject or UNity). Thanks in advance.
...