There are already jQuery based Edit in place plug ins available. But i am not sure how can i use them with Asp.net MVC. Any code sample for controller? I want to edit the .aspx files as my web application is not getting text/content from database...
...
I am really a newbie with streams, so I don't really know what I am doing here. :)
I have a XElement containing XML. I want it to return it as a file to the user.
XElement xml = IndicesXMLGenerator.XML();
//Code for creating a memorystream for returning to browser as file
MemoryStream stream = new MemoryStream();
XmlTextWrite...
I am posting a form to url /Admin/EditInPlace from page /About
In EditInPlace's conroller code i can find the Url-Referrer i.e. from which page request is coming. But how can i map the Url-Referrer to its View page??
In short how can i found that a page /xyz is mapping to which View.aspx file programmatically?
...
Hello.
I am attempting to unit test an ASP.NET MVC application using MonoDevelop.
The following shows a portion of my Web.config and the test.
<appSettings>
<add key="configCheck" value="3212"/>
</appSettings>
[Test]
public void ConfigFileCheck()
{
Assert.AreEqual( "3212", ConfigurationSettings.AppSettings...
I have a bit of a strange question. I'm building a multi tenant website with Asp.net MVC 2 and running it on IIS7. I'm trying to get my dev environment setup properly for testing but I'm having a weird issue though.
I created the website in IIS and pointed the directory to the location of my source code. I have just the basic HomeContr...
I have an ASP.NET MVC form that when submitted can return either an ActionResult if there was an error with the data, or if everything is fine it redirects to a different action that returns a FileResult.
I've created a bit of a sample to provide an idea of what I am doing. This is the html:
<%
using (Html.BeginForm())
%>
<%= Html....
Hi,
I am trying to come up with a model design to solve the follwoing problem:
I have files (plain text and xml) which I want to be able to represrnt them in a view in ASP.NET, also, I would need to detect certain words in lines and keep track of them. So, we can imagine I have the following
CFile: List<Message> CertainMessages
M...
I am going to use forms authentication but I want to be able to link the asp.net users to some tables in the db for example
If I have a class and students (as roles) I'll have a class students table.
I'm planning to put in a Users table containing a simple int userid and ASP.NET username in there and put userid wherever I want to link ...
Hi Everyone!
I am trying to learn asp.net MVC and having an issue to submit a textbox value to a model.
I have a text box in which users will type a number and when they hit the routelink the routelink will take the value from the textbox and assigns it to one of .Page item.
<%=Html.TextBox("PageIndex")%>
<%=Html.RouteLink("Search", "...
I'm trying to deploy an MVC app which runs fine in Visual Studio 2008 yet gets this error when deployed to the server. "Object reference not set to an instance of an object." The line of code it fails on is :<%= Html.ActionLink("Home", "Index", "Home")%>. Here is my web.config if that helps:
<?xml version="1.0"?>
<configuration>
<confi...
In the Details view of the HomeController, I'd like to create a link to the Email view on the MiscController. In addition, I need to add an item to the QueryString.
I'd like to create a link that goes something like:
<a href="http://www.blah.com/misc/SendMail?id=6">
<font size="1">Report problems</font>
</a>
I've tried the ...
After a pair programming session, an interesting question came up which I think I know the answer for.
Question: Is there any other desired way in ASP.NET MVC to retain 'state' other than writing to database or a text file?
I'm going to define state here to mean that we have a collection of person objects, we create a new one, and g...
ASP.NET MVC 2.0: Simple Model Binding not working/binding as it should
i have a simple custom object names Comment (linq to sql generated one), it has various values, but only two values are being sent from a HTML POST from to my action, and here is my action that accepts them...
Function InsertComment(ByVal Comment As Comment) As Act...
This is the code I currently use:
<% Uri MyUrl = Request.UrlReferrer;
if( MyUrl != null)
Response.Write("<a href=\"" + MyUrl.PathAndQuery + "\">Back</a>"); %>
I would think there is a more "MVC Html helper" way to do a "Back" button. This may require more information about the routes already setup, a list of possible parame...
ASP.NET MVC
I have one page Index.aspx where I'm loading two usercontrols into divs. This is working fine. For the moment the usercontrols just shows data and thats working fine. But now I want to add a delete function in the usercontrols and then refresh the div in the Index.aspx page. Is this possible?
Index.aspx
<!-- Panel One -->...
Is it possible to make a call from a view to a controller via ajax (in my case using JQuery) that doesn't return anything? I'm just setting some variables in session and there is no output to display.
I tried setting the method on my controller to void but it won't work. Right now I've marked the method return as JSonResult and I'm simp...
Can someone explain the format for ASP.NET MVC controllers? They look like this:
public class ProductsController : Controller
{
//
// GET: /Products/Edit/34
public ActionResult Edit(int id)
{
// ...
}
}
Why don't they follow the standard C#-notation with three slashes and XML markup? And why the empty line...
I'm working on a new webproject and I've encountered a problem which I never quite seems to figure out how to do correctly. My application is to use a repository that should be accessible from the entire application. Specifically it needs to be callable from ASP.NET MVC ActionFilters.
Any thoughts on the subject?
...
m using asp.net mvc for ma project. in that i hav created one folder ThumbVideos inside Content folder.While uploading the video the thumbnail of it should save in that folder.Plz help me.
...
Can anybody give a code snippet which will explain how to use Binary streaming render type in ASP.Net Charting controls using $.ajax call in ASP.Net MVC Framework. ?
Ajax call will look like this-->
$.ajax({
type: "POST",
url: "/DrawChart/" + drawingParamter1+ "/" + drawingParamter2,
dataType: someSuitableD...