asp.net mvc regular expression
(@"^\w+(?: \w+){0,8}$" the above regular expression restrict all the special characters except _ . how would i restrict it. ...
(@"^\w+(?: \w+){0,8}$" the above regular expression restrict all the special characters except _ . how would i restrict it. ...
In a JTextPane what are the MVC components? Also if I wanted to know for a JComponent their MVC parts how can discovery them? ...
Maybe I'm crazy, but I get MVC. It makes sense. MVVM seems like a way to make MVC harder, am I wrong (if so, why?)? ...
I feel a bit stupid asking this, but I just want to know how I can have a html button call a server site action on my controller. For example lets say I have a Text Area and a submit button. The idea would be to click the submit button and the text in the text area would get submitted to the Database. Very simple stuff. Thank you for t...
I have an existing ASP.Net Application, into which I am attempting to introduce MVC2. Hopefully I can remember the steps, but what I did was the following: Created a dummy MVC2 project. Compared and merged .csproj, resulting in the Add Item commands showing MVC2 items. Compared and merged the web.config Compared and merged the global....
I understand that I could show online users using ajax. For example, I could detect and display if the user has been online or offline for last 5 minutes or 15 minutes etc. How do I filter the users by online vs offline? Or How do I filter the users by offline since 5 minutes, 10 minutes, 15 minutes etc etc.?? Since this logic will b...
I am writing a CakePHP app but it doesn't seem to be showing flash() messages on any of the pages. I am using $this->Session->setFlash(); to set flash() messages and using $this->Session->flash() in my default template, as well as $this->Session->flash('auth') on the login and registration pages but they don't show the validation errors ...
hi I have an aplication in asp.net MVC and using telerik grid for displaying the record. Now one of my field has some large text about 1000 character due to which the text is getting extended vertically and layout is not looking good. Is there any way to show some specific number of character in the column and show the whole text in a t...
I am facing an issue while showing the partial view in div with updatetargetid property of Ajax.ActionLink. This is my controller- [HandleError] public class HomeController : Controller { static NumberViewModel model = new NumberViewModel(); public ActionResult Index() { model.IsDivisibl...
I have a visualforce page and I am using jqgrid to display data on this page. The url that the jqgrid points to is a visualforce page(https://test.visual.force.com/apex/GridResults) which outputs only JSON data. This page does not have any header or html information. The problem is that when I run this page, the grid renders with colum...
Hi all I want to develop a website with java but I'm absolute begginer in java web development. I want to use a framework that uses the MVC pattern and Ajax. I did some search and found that Spring or Struts are suitable but I'm not sure. could you please recommend a framework ? Thanks ...
I have just been reading about the MVC design pattern for Cocoa-Touch applications and it suggested using a property list for the model. My question is if you needed to do some calculation on the data in the property list where would the code for that calculation go? In the past I have used a singleton object for my model and then used ...
background: i came on board to a team/ project that have developed a .net home grown mvc type architecture with home grown Ajax calls to persist data in a series of 6 screens to a context object on the server to maintain state. question 1: this seems like using mvc just to say we use mvc and not the mvc way of doing things. it feels t...
I am tring to add a user control to do a search. this user control is to be used on the home page and for example /category-page. where do I write the code for data capturing. is there a way to force the user control to submit to a HomeController or the controller I want? I hope my question is clear. I have the following on the homeco...
I've got a table that stores a True/False value as a sqlserver bit field (Featured). First, is there a better way to generate a dropdown list for this other than manually? Second, here's what I've got so far which works but does not add selected="selected" to any items in the DDL. Edit 1: I've updated this example according to the ans...
I'm thinking about an implementation of MVP - Passive View pattern in JavaScript. In most case the view will be simple dom elements where the presenter attaching event listeners. But when it comes to widgets like JavaScript based pseudo selectboxes, auto suggest or aria features, should this be part of a JavaScript view class or should ...
Hello, I am trying to cache a selectlist which is not null but I get a null exception error. The line of code causing the error is: (note item is created using Cache item = new Cache(); and tripVM.friendDropDown holds the selectlist item.Insert("friendDropDown", tripVM.friendDropDown,null,DateTime.Now.AddMilliseconds(10000), TimeSpa...
I have a controller that handles file uploads. Ultimately I would like to be able to create attribute to decorate my controller actions like [HttpPostedFileType("zip")] or something similar. Currently I created this extension method which I use in the action. public static string GetFileExtension(this HttpPostedFileBase file) { ...
I have a question about the best practices of placing certain functions in controllers in an MVC web framework. Lets say I have a User & Tags controller. I have a function/method called addTag_to_user(). What is the conventions or best practices for placing this in either the Users or Tags controller? Though personally I am more incli...
I have a method which runs several rake commands. Does this method belong in the controller or in the model? My intention is to run this method upon every Save or Update ...