I have a site where users are allowed to create as many micro-sites with in the main site as they like. A user can also set other users as moderators of their micro-site and users can follow other micro-site. I am not sure what I am doing wrong, (this seemed to work with CTP3), but when I try to do simple stuff like
var site = _siteRep...
Hey There
I am using ASP.NET-MVC, and would like to format my html prior to sending it to the browser.
I have one page with multiple partialviews, and i want it all to be indented nicely.
I know this is stupid, but while in development it's nice to have well formatted html when you go: RightClick -> View Source.
Does anyone know of a...
Wondering if there is a better way to do this with ASP.NET MVC2. The following Posts on SO are little dated:
http://stackoverflow.com/questions/267707/how-to-pass-complex-type-using-json-to-asp-net-mvc-controller
http://stackoverflow.com/questions/560575/asp-net-mvc-how-to-pass-json-object-from-view-to-controller-as-parameter
and also...
I have a modal dialog (done through jquery UI) that submit a form to a remote controller Action.
This is the jquery function called:
$("fpForm").submit(function() {
$.ajax({
type: "POST",
url: "ForgotPassword",
data: $("#fpForm").serialize(),
success: function(response) {
alert(response);...
I'm implementing the MS NerdDinner app in ASP.NET MVC 2 and I'm using google maps instead of MS maps. I use sample code from the google site for the maps. I have 2 very simple views, Create.aspx and and Edit.aspx in the same directory, which create and edit dinners respectively. They are very simple - they both render a partial view name...
I'm trying to make a TextArea have a default value.
<%: Html.TextAreaFor(Function(model) model.Description, 5, 10, New With {.Value = "Description: "})%>
This works properly in a TextBoxFor but doesn't work in a TextAreaFor
Am I missing something very obvious?
...
When a user goes to register on my site and if they enter wrong information it redirects them back to the same page to correct any mistakes on the login page. When they are redirected the username and other information they entered previously is in the form fields. Why is this - not that it is bad or anything but i would like to modify t...
I have PDF file and i need dynamically put image(logo) in some place of this pdf file.
I just need to say "here is image put it to special position on pdf or something and give me output". And than i pass this output in my controller in response. That's it.
Could anybody suggest any good free library for such case.
iTextSharp?
...
Hi guys,
I'm currently developing an image viewer using asp.net MVC. The image viewer itself works as a charme, but I'm not happy with the caching.
To explain: I'm using the GeneratedImage (http://aspnet.codeplex.com/releases/view/16449) in order to produce the thumbs, but the Server Side Caching is only limited to 5 Minutes and can't ...
Hello, I'm building a web app (front-end and admin section). There are 4 main record types (books, cars, houses, deals). The user can do query and see the detail of each record type, the admin can do query as well and in addition can edit and delete.
Front end
controller: each record type has the following actions
//
// GET: /{reco...
Problem with <div> tags
Works fine:
Text "Whatever" is in column 1, followd by a radiobutton:
Works also fine (no radio button with text):
The next cell AFTER the text "Whatever" should be displayed in column 1 of the next row - instead directly under the text.
Background:
The table structure is made by my html helper. He genera...
Hello,
Anyone knows how can i start to develop a multitenant site in MVC2, in a way it run on Windows Azure?
I search a lot about this question, and i allways find theoric explanations, everybody says it can be easily done, but i dont find any sample...
Can someone explain me where to start?
Thanks,
João
...
Hi guys,
My problem is that i have a dynamic loop in which i generate 5 textboxes and now i need get the data of each index because i want to send by in a array to the controller. Can anybody tell me how i get the values from the textbox arrays. All textboxes have the same name and id but they have an index.
...
How to create the environment to select the image file and upload it in asp.net MVC 2 ? What code I have to be write for this ?
Which scenariois better out of :
Store image in database or keep copy of image in file system at application domain and maintain its path in DB ? what code have to write in asp.net MVC 2 for preferred scenario...
I have a strongly typed view that is using a viewmodel I created. I have a date field in my viewmodel that is a formatted display of a property of my main model. In the POST Edit action (I followed the nerd dinner tutorial) parameters are int id, FormCollection collection. Using my repository I lookup the model off of ID and I am left to...
Is there any way to use a custom html helper with the <%: %> syntax ?
I know that if i'm use the code below, it's ok, but it's seems not so elegant and secure.
<%= Html.MyHelper("Some Data")%>
I mean, use <%= %> is the best practices?
...
Hi, i've got this code
Model
public class PdfPage
{
public IEnumerable<PdfPhoto> Photos { get; set; }
}
public class PdfPhoto
{
public string path { get; set; }
}
View
<ul>
<li>
<%= Html.Hidden("ListPages[0].Photos[0].path", "/public/pdfMaker/4_e.jpg")%>
<%= Html.Hidden("ListPages[0].Photos[1].path", "/public/pdfMaker...
I find myself pasting this code over and over on many views that deal with forms.
Is there a simple approach to refactor the following markup from a view in MVC2?
The only changing part is the route for the cancel link (LocalizedSaveButton and LocalizedCancelLink are helper methods I created).
I tried extracting it to a PartialView but I...
Hi:
I am using jqModal to allow users to create new contacts from a list by poping a jqModal window, but can't seem to get any validation to work within the modal window. I know that the form is failing because in the contoller the model state is invalid and when I re-render the form nothing shows. I am using ajax events to close the mo...
In ASP.NET MVC 2, how would you go about binding a view model property that is a DateTime where the application must have 3 drop down lists for choosing month, day, year?I've read Scott H.'s blog post about binding dates some time ago, and that seems entirely too convoluted for such a simple case. Surely there's a cleaner / better way to...