Need to develop a disconnected application for Windows Mobile 6.x to accompany an existing MVC Web Application.
Wondering if anyone knows of a web server for the compact framework that will run MVC Web Apps?
Padarn looks good but seems to be CF 2.0 only
...
I have an MVC web application. I get an "Object reference not set to an instance of an object" error in line 16 below. It's a master page file. When I try to place a breakpoint in that line or anywhere in the file, I get a "this is not a valid location for a breakpoint" error. I have clicked on every line and I can't place a single brea...
Hi all,
I'm developing a ASP.NET MVC application. There is little space for me to put two standard file uploading web controls in a page. So I'm seeking for some succinct alternatives. A checkbox-look button pops up a file open dialog is ideal. Is there any kind of stuff?
Thanks in advance!
...
Hi I'm new to ASP.NET MVC
and i want to create a class to contain site wide functions for my application
what is the best practice to do this?
where should i create the class ? in what folder?
should i create a new folder?
edited:
I need a function that return base uri, and it have be available to call from any controller.
A date form...
I got the Rescue attribute working. It properly serves up the DefaultError view when there is an unhandled exception.
However, these exceptions will not get logged or emailed. This SO question is answered by Atif Aziz and it looks pretty solid, but it applies to the built-in HandleErrorAttribute, which Rescue replaces, right? How do I g...
i have 2 actions
public ActionResult FilesAdd(int id)
{
FillParentMenuDDL(id);
return View();
}
[HttpPost]
public ActionResult FilesAdd(int id)
{
//some logic...
FillParentMenuDDL(id);
return View();
}
but it is error because of same parameters, but i need only one param...
Hi,
I have a form which binds a model and a file upload using the default binder for HttpPostedFileBase.
This works fine when using Html.BeginForm(). However, I wanted to perform the same action using AJAX so I replaced this with Ajax.BeginForm() changing the parameters accordingly.
The model still binds correctly, however I can't get...
I have an existing database in SQL Server. I am trying to create an asp.net mvc project around this db.
For this purpose I need to add the db to app_data folder of asp.net MVC project
How do I achieve this?
Note:
The SQL Server is in another system and I do not have rights to install SQL Server Express on my machine as well :(
...
Hello,
I have a ASP.NET MVC page. I Configured a IIS Website and added the additonal H:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll.
my Directory Structure is like that
/
../App_data/
../bin/
../Content/
../Properties/
../Scripts/
../Views/
../Default.aspx
../Global.asax
../Web.config
My page is configured to port 9...
This is my code for validation money type
[Required(ErrorMessage = "مبلغ پیشنهادی را وارد کنید")]
[RegularExpression("^[+]?\\d*$", ErrorMessage = "*")]
public decimal FirstlySum { get; set; }
If I enter a word (such as "asdf") for the textbox corresponding to this property, I get the following error:
The value 'asdf' i...
Hello SO,
I'm currently working in an MVC 2 app which has to have everything localized in n-languages (currently 2, none of them english btw). I validate my model classes with DataAnnotations but when I wanted to validate a DateTime field found out that the DataTypeAttribute returns always true, no matter it was a valid date or not (tha...
In my system has the function to sending email notification to warn another department that the contract is nearly expired.
Has any suggestion to send the email via my mvc project, I try to use System.web.mail but smtp not accept. Do I need to prepare anything to send email.
Thanks you for suggestion.
...
I want to know how, from a controller action, I could identify the area in which the controller is in via the MVC framework (I mean, without making all controllers in a given area inherit from a base controller with that info).
I'm particularly interested in the case of child actions (controller actions rendered via RenderAction), the ...
This is more of a question to satisfy my curiosity vs something I really need answered. Back in ASP.NET WebForms, I'd occasionally use a positional parameter in a query string if I only had to pass one thing to a page. For example:
http://localhost/site/MyPage.aspx?ABCD1234
Then my code would look like this:
string accountNumber = "...
My form contains a textbox for date input. When submitted the data is used to add a row to the table. The view is strongly typed to the table.
The problem is that the database server is configured with US date format. But the users need to use UK date format in the textbox. When users enter uk date format error is thrown.
The database ...
I have a Logon page in a MVC (1.0) application that I am securing with SSL, I have an attribute that inspects the request for the page and redirects to a https uri when it is requested with http. This all works, however when I post the form content i get the following error:
The parameters dictionary contains a
null entry for para...
Greetings
On all my controllers I recycle the same code that wraps my models and to accesses the service layer -- and I'm tired for copy / pasting it into each controller:
private IProjectService _service;
public New()
{
_service = new ProjectService(new ModelValidation(this.ModelState));
}
public New(IProjectService service)
{
_servi...
i have a link
<a id="DownloadLink" href='controller/action' target="_blank">Download File</a>
that has to open a image in another tab or page. but it offers me to download the file.
my action looks like this
public FileContentResult GetSurveyFile(int Id)
{
if (Id == 0)
return null;
Su...
I have a LINQ to ENTITY query that pulls from a table, but I need to be able to create a "fuzzy" type search. So I need to add a where clause that searches by lastname IF they add the criteria in the search box (Textbox, CAN be blank --- in which case it pulls EVERYTHING).
Here is what I have so far:
var query = from mem in contex...
I have an asp.net mvc2 application that is using StructureMap 2.6 and NHibernate 3.x. I would like to add unit tests to the application but am sort of at a loss for how to accomplish it.
Say I have a basic controller called Posts that has an action called Index. The controller looks something like:
public class PostsController : Cont...