mvc

databound checkbox list asp.net mvc and linq to sql

How do you create a databound checkbox list using linq-sql and asp.net mvc thanks ...

MVC Authorize Attribute + HttpUnauthorizedResult + FormsAuthentication

After browsing the MVC section on CodePlex I noticed that the [Authorize] attribute in MVC returns a HttpUnauthorizedResult() when authorization fails (codeplex AuthorizeAttribute class). In the source of HttpUnauthorizedResult() from CodePlex is the code (I'm not allowed to enter another URL as my rep isn't high enough, but replace t...

LINQ to SQL defining Where class depending on parameters

return (from s in db.StudentMarks where s.Class == Class && s.Year == Year // this line orderby s.Year, s.ExamType select new StudentAddMarks() { --Obj }).ToList(); I am going to return an Object depending on the Class and Year params. ...

Why isn't this model returning any values?

I'm trying to build VERY basic model->controller->view structure with CodeIgniter. I'd rather use models (and model functions, more importantly) and controllers than executing queries within each view. First off, here's the model: class Leads extends Model { function Leads() { parent::Model(); } function fetch...

String replacement in CakePHP routes

In my application, I have a number of controllers with the same prefix. For the sake of example, let's say they are: my_posts my_users my_letters The URLs generated for these are obviously: /my_posts/view/1 /my_users/add /my_letters/whatever I'd like to set up some custom routing so that I can use the URLs like this: /my/posts/vie...

Making CodeIgniter use <ControllerName>_Controller by default without changing the library?

I'm finding I have lots of conflicts with class names when developing for CodeIgniter. For example, I recently had the situation where I had a Checkout controller: class Checkout extends Controller { // Contents } And then went on to create a new custom library: class Checkout { // Contents } Which would obviously throw a...

How to route a multiple language URL with a MVC

I need multi language url route of existing controller. let's explain more: I have a controller with name "Product" and View with name "Software", therefore by default if user enter "http://mysite.com/en/Product/Software" ,get right content (that really exist in http://mysite.com/Product/Software), but i need if other user (french user...

Username Availability

I am currently implementing a registration form and doing the username availability checking using jquery and php. In this case where the user_availability.php is in same folder as the registration from, it is easy to specify like the following to retrieve the function in the page. $.post("user_availability.php",{ user_name:$(this).val...

Why does Code Igniter give me a white page?

Hey, not sure why CodeIgniter is giving me a blank page when I load a simple model. I'm breaking the code down, backwards, and I can't figure out what's breaking. Here's the controller: class Leads extends Controller { function Leads() { parent::Controller(); $this->load->scaffolding('leads'); } function index() { $data ...

Complex Filtered Parent-Child LINQ to SQL Query

The title and tags of this post may be incorrect since my solution may end up being more MVC Controller - Model related instead of LINQ related... I am building an MVC (not that the platform is important) site to display Invoices and the Invoice Details for approval before being paid. Basically this gives me a standard Master-Detail dat...

.NET MVC links on IIS 5.1 produces 404 error when Wildcard mapping is implemented.

I have a simple MVC site with ActionLinks to content such as "FAQ" and "About Us". I have set up the virtual directory in IIS Manager and set the mapping (no wildcard mapping option in IIS 5.1) for ".*" to point to aspnet_isapi.dll. This allowed me to bring up the home page and view it. However, when I click on any of the action links, I...

How to find issue on remote server that you don't have access to?

Ok, so this is my dilemma... I have an ASP.NET MVC site that is running into some conditions that it is pegging the processor on the iss boxes it's running on. I don't have access to these servers (it's a farm of about 5 iis6 boxes behind a netscalar). I am doing some logging to a sql database, but the problem is that when the cpu peg...

handle exception into alert box

Hi All, How can I coerce an exception message that has bubbled from my business layer into an alert box in javascript? BTW, I'm using ASP.NET MVC 1.0. Thanks, Rod. ...

jqgrid in MVC not working

Hi Am currently learning how to use jqgrid in Zend MVC structure. Below is my js script. $(function() { //tabs $("#tabs").tabs(); //Accordion $("#accordion").accordion({ header: "h3" }); //place jqgrid in accordian. $("#list1").jqGrid({ url:'/../../artist/index', datatype: "json", colNames:['ID','Artist...

how update a view every five minutes in rails

Hi, I have a button StartMonitor ,and after user pressing this button, I will start checking current available memory every 5 minutes. That means the view should be updated every 5 minutes to show all the data got so far. I can get the data , but I have no idea how to update the view. What would you recommend?Thanks. ...

Using Html.RenderAction and Ajax.ActionLink together.....

when i do this, i get the ACTION being called TWICE, what should i do about this? if i call html.partial instead to just render the control, then i need to specify all the objects/values manually, which i shouldn't need to do this as the ACTION itself takes care of this stuff. i maeks sense to have both these work together but they don...

Logging URL return values into firebug console

Hi Am currently debugging an application with firebug and I would like to view what json/XML values my urls are returning. Am using the MVC structure and therefore something close to jQuery("#list1").jqGrid({ url:'http://localhost/Zend/jqueryapp/public/artist/index', datatype: "json", mtype: 'GET', ...

Accessing MYSQL database using LINQ in asp.net MVC

hi I want to use MYSQL database for accesssing the data in a mvc application. The connection string that i am using in web.config is: Then I have prepared a model,controller,view for accessing and displaying the data. I am using LINQ o get the data from database but getting the exception:" A network-related or instance-specific er...

help resolve url in facade class or controller class

Hi All, I have a facade class that my controller class calls out to and in that facade class, for whatever reason, I'm building a string a href element. And it resolves fine in casini but when it gets out in the real world like localhost it doesn't work. Is there a way to do this? string goBackLinkForErrorMessage = "<br /><a href='/My...

Why is Magento trying to call in the Mage namespace rather than my custom namespace?

I’ve created a module within the local code folder in our custom namespace. The block isn’t displaying on the frontend, and on checking the exception log, it turns out Magento is looking in the wrong place. exception ‘Mage_Core_Exception’ with message ‘Invalid block type: Mage_MyCompany_ForthcomingProducts_Block_List’ in /var/www/html/...