Can anyone shed any light as to why my JSON is coming out below, with the extra backslashes. I am using ASP.net MVC to serialise a datatable, when I debug in Visual studio it all looks ok but when I look with firebug with adds the extra characters?
Any ideas anyone?
"[{\"uid\":\"516219026\",\"pic\":\"http://profile.ak.net/\",\"first_na...
My methods take HttpRequestBase as arguements, and I am finding it strange as to why the Actions in Controllers have access to HttpRequestBase but the view page's have HttpRequest.
Is there a reason for this or just something that was not thought through?
...
I am looking for a good description the the flow of events (life cycle) of what happens after I type in my application's url in the browser to when the page is actually displayed. Does anyone have one?
Thanks.
...
I'm working on an EmailSender, and I'm grabbing the email address from my Web.config file. I'd like to also grab a "display name" for that email, from the same section if possible, but I'm not seeing an obvious way to do this.
In my Web.config file, I have included a default "from email address", like this:
<configuration>
<system.ne...
This extension method does not work on two separate development machines:
public static string DdlTest(this HtmlHelper helper)
{
var si = new List<SelectListItem>();
si.Add(new SelectListItem() { Text = "1", Value = "1" });
si.Add(new SelectListItem() { Text = "2", Value = "2" });
return helper.DropDownList("test", si, n...
I want to get the URL of a route using the same syntax as Html.ActionLink, but don't know how to do that from my View.
Is there an HtmlHelper extension that works like ActionLink but returns only the URL?
For instance, I want to write:
<img src="<%= Html.ActionUrl("Image", new { id = 42 }) %>" />
...
Hi,
I'm tasked to create a web application. I'm currently using c# & asp.net (mvc - but i doubt its relevant to the question) - am a rookie developer and somewhat new to .net.
Part of the logic in the application im building is to make requests to an external smsgateway by means of hitting a particular url with a request - either as pa...
I'm having a hard time wrapping my head around how to use the Memberships in MVC. I know there is the built in ASPNETDB database which has all the basic tables for users and such. But what if I wanted to add a relationship between one of my custom tables and this built in user table?
If I had a database table that contained blog comment...
Im using asp.net mvc. c#
How can i get the existing url (may have a bunch of querystring parameters on it)
and then just append another parameter to the quesrystring. and make this a clickable hyperlink.
...
I'm using Entity Framework with an AS.NET MVC application. I need to allow the user to create new records and modify existing ones. I am able to fetch existing records no problem, but when I pass back in the edited entity and try to save it it creates a new one and saves it and leaves the original unmodified.
I am getting the object fro...
I have a page with a set of checkbox's, that I want to run a javascript function on when there is a change (I have done something very similar with dropdown's - and that worked)
However with the checkbox's I have three problems:
my onChange event only runs "sometimes" (you have to change the focus between the different checkbox contro...
Hi, is there a way to get or store the last page visited? Example if I'm on a List Page with a New link that loads a page with form. If the user cancels, you go back to the previous page (List Page).
Thanks
...
Hi,
So I am new to working on web projects in general. I am working on an MVC application in Visual Studio 2008. I have generated an SQL database within VS, and I have deployed my application on IIS. However when I try to do anything in the application which will spark an SQL query, I get the following error:
"Failed to generate a user...
Hi
I'm having problem accessing the text field in a selected value of Html.DropdownList.
My ViewModel is
public class UserViewModel
{
public List<SelectListItem> SupportedCurrency
{
get;
set;
}
public string DefaultCurrency
{
get;
set;
}
}
My controller populates the dr...
I am developing a web application using asp.net MVC...
RightClick->Add->Add ASP.Net folder-> there is no bin folder...
I am using asp.net MVC 1.0 with visual studio 2008 sp1... Any suggestion...
I find a bin folder in my root folder,but not in the solution explorer..
...
Hey guys
Here is the lay of the land. Like most people I have my domain object and I have my view models. I love the idea of using view models, as it allows for models to be created specifically for a given view context, without needing to alter my business objects.
The problem I have is with type level validation defined on my domain...
<p>
<label for="Tags">Tags:</label>
<% String tagsText = "";
foreach (Tag item in Model.Tags)
{
tagsText += item.Name + " ";
}
%>
<%= Html.TextBox("Tags", tagsText.Trim()) %>
<%= Html.ValidationMessage("Tags", "*") %>
</p>
Obviously this code is not perfect, and I admit that. But how ...
Hi
I have 3 tables. Blog and Tag have a many to many relationship. BlogTag is a junction table with a quantity column.
**Blog**
BlogID
Title
**Tag**
TagID
Name
**BlogTag**
BlogID
TagID
Quantity
I'm not sure how I handle the quantity column. I'd like it to store how many Blogs have a certain Tag Name
How do I deal with the quantity...
in my application, i have implemented ajax 4.0 client templates
currently my templates resides on same .aspx page. (say Main.aspx)
but i want to externalize them.(ie all the HTML would go on another page)
for that i have used $.get() like
$.get("/Module/getTemp/" + TemplateName, function(result) {...
now, i want getTemp function i...
Hey guys
Just wondering what people think about creating an area to hold/manage json based requests (note I am thinking mostly get data not post data). I know its not your typical use of an area (i.e. normally you would create a different area for blog vs forum) but I am getting to the point where my project isn't huge but I definitely...