I am working with ASP.net MVC 2 framework, for multiple sites. We have a base site and then sub sites that inherit from a "Core" site that contains 90% of the functionality that the sub sites will use.
In one of the controllers, I am saving some data, adding a UI message to the tempData and then using Response.Redirect.
The redirect w...
I'm trying to redirect the user if they login successfully but the code I have on my page seems to be preventing the redirection from working. If I remove the jQuery below the redirection works. Can somebody tell me tell me if there's something I'm doing wrong? Thanks
I have the following Action:
[AcceptVerbs(HttpVerbs.Post)]
p...
On my HomeController I have an index action which redirects to the index action of the CustomerController via the RedirectToAction method. In this instance I don't like how RedirectToAction modifies the URL showing mysite.com/Customer. Are there some alternative mechanisms to performing a redirection that will allow me to still leverage ...
I have a view model -
public class MyViewModel
{
public int id{get;set;};
Public SomeClass obj{get;set;};
}
public class SomeClass
{
public int phone{get;set;};
public int zip{get;set;};
}
So on my controller when I post back MyViewModel it has all the values for all the fields...but when I do
return RedirectoAction("Som...
I have a scenario where I need the following functionality:
In View I have call as:
$.ajax({
type: "POST",
async: false,
dataType: 'json',
url: "ControllerA/ActionA",
data: { var1: some_value },
success: function (data) {
if (data == true) {
form.submit();
}
else if (data == fa...
I have written a rule for redirecting in .htaccess file
its redirecting for some pages , if we give that link manually..
but what i want is ,it should redirect automatically....
My requirement is :
Instead of this link,
links.php?page=1&ipp=All&exchange=adddata
It should be redirected automatically
http://example.com/folder1/links/...
I am trying to use this redirect_to
redirect_to :controller => :note_categories, :action => :destroy, :note_id => params[:id]
This is the URL that results
http://localhost:3000/note_categories/272?note_id=272
and this is the error message
Unknown action
No action responded to show. Actions: destroy
The reason I am redirecting to...
Is a redirect less efficient than returning other types of result? I ask because if my current request is asynchronous I want to return a partial with only relevant data. Otherwise I need to render the entire page. So I'm thinking of returning a redirect to an action method which will return a View. My understanding is that a redirect wi...
I have a controller in which is do some checks.
If for one reason or another and exception occurs I want to display the error messages in another view in another controller.
This is how my exception handler looks
catch (Exception ex)
{
string infoMsg = "Delete the user and recreate is with an appropriate username...