I am trying to redirect a user when they entire a URL in this format:
http://example.com/http://example2.com/
To the following:
http://example.com/?m=example2.com#http%3A%2F%2Fwww.example2.com%2F
I want to strip out the host of example2 and make it a query-string, then URL encode the full URL of example2 and put it as the anchor.
...
I found that Asp.net Mvc controller can serve both Asp.net Mvc View and Silverlight application via DynamicActionResult(It can be Simple Action Result or Json Action Result depend on request type). So, I have 3 options for creating middle-tier for Silverlight application.
Pure WCF Service Every request to WCF must be declare in interfa...
yesterday I deployed my website from c:\development\project\ to c:\inetpub\wwwroot\virtualdir\ (same pc). It worked for some time, I could reach the website by going to http://computername/virtualdir/.
But this morning everybody got an error: The system cannot find the path specified.
What is the path being specified that cannot be fou...
Hi
I think I am not getting the meaning of any of this.
My purpose is to create a multi tenant ASP.NET MVC Application.
I saw a great post on how to do this here
, but Nhibernate isn't an option.
One of the things I want to understand is:
Is MVC (along with everything else) supposed to help in creating multi tenancy web apps?
I have ...
Hi. When is the apropriate time (part of code) that i can gather information from servervariables? I mean, i have tried calling this
string temp = Request.ServerVariables.Get("HTTP_REMOTE_USER");
in the Controller constructor, but i am getting a nullpointerexception, while in an action it works properly. And it just doesnt seem very c...
I have a table that holds system users with their last login date and time in it. The admin users of the system need to be able to add users, but when I add the new user record a validation error occurs unless I put a valid datetime in the last login date field.
I've tried manually changing the field to dbnull, null, etc prior to the s...
I am developing a ASP.NET MVC aplication and I need to record the history of logins of a User. I need something similar to the last seen here in Stack Overflow (I will be keeping the history, I don't know if SO does this). I want to know what is the best way to do it?
Global.asax: Application_AuthenticateRequest, Application_AuthorizeR...
Issue: the primary key of the base table is named differently than the the key in the fk table.
Subsonic 3 does not know how to handle that, which is fine, its beta. So I was going to change the Html.ControlFor logic to just grab the table and use the pkname from that:
var fk = db.FindTable(col.ForeignKeyTo.FriendlyName);
However th...
In computer science we've been taught that each method should do one thing and one thing only. I'm a little confused then that we see MVC actions like the following given as examples of good practice:
[AcceptVerbs(HttpVerbs.Post), Authorize]
public ActionResult Edit(int id, FormCollection collection) {
Dinner dinner = d...
I have been getting this annoying error/bug in Visual Studio 2008 quite a bit when doing ASP.NET MVC.
"__o" is not declared
What is the problem, and how can I fix it?
...
Scenario
I am having dropdownlist on a page,
now on the change event of it I would
like to pull some data from database
and then display it.
I am able to do it with postback, I
tried using Ajax.Beginform() but it
still doing a post back.
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<s...
Hi,
I want to load some html data dynamically from the server (like a grid composed by lots f and ) using jQuery.
At the moment I load it like this:
$("#Ricerca_Div_ContenitoreRisultati table tbody").load("/Segnalazioni/CercaSegnalazioni/3");
and generate it like this:
public ActionResult CercaSegnalazioni(int flag, string sort...
I need to be able to do two things with Javascript or JQuery, without involving third-party open source libraries:
Use a jQuery or Javascript function to fill the HREF attribute of a link.
Perform an HTTP Get or Post operation OnUpdate of a text box or combo box (using the above javascript function to specify the HTTP target)
The end...
Hello,
I'm trying to add a new ADO.Net Entity Data Model to an MVC project I am working on.
When I complete the wizard, choosing my db and tables (just a single table for now) I get an error ""Exception has been thrown by the target of an invocation." and it throws me back the add new item dialog.
At this point, an empty Data Model ha...
I'm using a masterpage in my ASP.NET MVC project. This masterpage expects some ViewData to be present, which displays this on every page.
If I don't set this ViewData key in my controllers, I get an error that it can't find it. However, I don't want to set the ViewData in every controller (I don't want to say ViewData["foo"] = GetFoo();...
Scenario:
I have a page which contains a dropdownlist and a table which contains a list of details based on the value selected in the dropdownlist when the dropdown is changed.
Now at first instance when the page is loaded, the dropdownlist contains a blank value followed by other values. So for the first time there won't be any values ...
for globalization reason I need to be able to do this:
http://mysite/home
http://mysite/Accueil
what I tried is to inherits home control in my Accueil class:
Public Class AccueilController
Inherits HomeController
End Class
problem is, it's trying to go into the Accueil folder and look for index.aspx there
The view 'Index...
I have a controller in ASP.NET MVC that I've restricted to the admin role:
[Authorize(Roles = "Admin")]
public class TestController : Controller
{
...
If a user who is not in the Admin role navigates to this controller they are greeted with a blank screen.
What I would like to do is redirect them to View that says "you need to be ...
I have a application that generates a couple of different mails. These mails are currently build up using a string builder that generates a HTML based string that is the mail content.
This approach is getting messy. The code is objects mixed with HTML, etc, etc. What I'd like is to have a template similar to the one used in for example ...
I've been tasked with re-writing a fairly large web application for a company. This application provides certain financial/risk analysis to 3 clients that we currently have.
The huge issue around this app is each client is different and has slightly different data. They all log into the same website but after that their experience ca...