Two centered columns (Bootstrap)

I have the following Razor View <div class="container"> <div class="row well"> <div class="col-md-4 col-md-offset-4"> <h2>Create</h2> <h4>Create Advert</h4> </div> </div>

Add an extra button to the nopCommerce cart

I want to write a plugin that adds a new button to the shopping cart. This button would be the third one beside the update button and the continue button. In the picture you can see a red button like the one I would like to add. The picture is just a

PageData Fails to Send Data to WebMatrix

I am building a website with WebMatrix. I would like users to enter their name in the main page and after redirection their name will be shown in the results of another form. But my code is not working. This is a snippet of the main page: @{ if (IsPo

View pending IEnumerable

Well im kinda new in Mvc and im learning alone from scratch, i have a aplicattion that controls expends and earnings and what i am trying to do now is, basing on a list of earnings and expends give me the balance from a user, im having a lot

Use Html.DropDownList in javascript

I have a Razor page that allows users to add a variable amount of attendees to a meeting object. On the page, there is an "add attendee" button that inserts the textbox onto the page and increments the subscript so that the model binder can pick

Disable the html property by using viewbag

I am trying to render a dropdown list as diabled once the on change event has been triggered. I am passing the disabled flag in a viewbag from the controller on httppost. However, the viewbag's name is displaying in teh html flag rather than just the

Invalid object name 'dbo.customers1'

I'm getting the error "Invalid object name 'dbo.customers1'" on my view... @foreach (var item in Model) { <tr> <td>@item.orderid</td> <td>@item.customer.firstname</td> I have the ViewModel classes... public class or

OnClick or something in Select

My select option looks this way, <select class="chosen"> <option value='' disabled selected style='display:none;'>Add new criteria</option> @foreach (var item in Model) { <option value="" onclick="ShowMessage(

CSHTML files do not load outside of views

I have a C# MVC Razor site. Typically, Controllers load views from the Views folder. However, I have a special circumstance where I need to render a view outside of the Views folder. How do I do that? Controller will load /Views/Random/Index.cshtml C

Export multiple Excel sheets from the Razor view

The following code exports some data, downloading it in an XLS file. What I want is to give all the three list and export each list of data in a separate sheet. How can I do that? My code looks like this: public bool ExportQuestionSet(int QuestionSet

jquery Select - replace with is not available to select

Environment/technologies: Cshtml / Razor, ajax, jQuery, SQL Server 2008 I implemented a simple search for my cshtml web app as follows: Input textbox for entering the search jQuery to call ajax method to request for appropriate method to do search in

C # modifying strings

I'm working on an application in which I retrieve data from a database to be displayed in a table in my cshtml. One of the fields I'm calling is a date field. The data for it in the database is stored in the following format: MMDDYY i.e; 091504. For

MVC Razor on ASPX

I'm new to MVC, There is one MVC application on which I'm working which used aspx engine (views are created in aspx). Now there is a requirement of migrating the GUI of application and I've read on that razor provides benefits over aspx engine. So, w

Calling the controller action method directly from Razor View

I looked around and couldn't find an easy solution. I've tried @GetUserName which doesn't work. I've tried @ { GetUserName which doesn't work. There has to be an easy way to call a method from the razor view engine. It is within a foreach loop. I nee

Management of the hidden field in several forms in Mvc 4.0

I am having multiple forms in one page and that page inherits one single model.Every form submission requires a common value. So, common value is stored in hidden field. The hidden field is kept global i.e outside of all the forms but my problem is w

ASP.NET MVC4 dynamic forms generation

I am new to ASP.NET MVC and need some help. I have a need to create a form where the form is dynamically created. For example let's say I have a model named Person. The Person has a first and last name. In the form I want to allow the user to enter t

MVC 4 Razor by adding the input type date

I'm wondering how to insert a <input type="date"/> for datetime attributes of my model. As for now Razor creates a plain input element with type="datetime". I want to make use of the new input types of HTML5.The input date value

How to edit multiple models in a single razor view

I am new to MVC3, I have an multiple models like BussinessDetails,ContactPerson,ServiceArea,Address and many more models. I have a single view page where shared view pages like Contacts,BusinessDetails,Address,ServiceArea etc.these are all in tabs. T

Send the status of the check box without send button

I have a view with a few checkboxes that can be selected or unselected. I'd like to always register any change in a checkbox, without the use of a submit button (the user could forget to do it, and it would waste time). So, is there a way to handle t

MVC3 categorized grid with totals and subtotals?

Is it possible in MVC3 (Razor if possible) to have a page rendered with totals and subtotals? e.g. I have 5,000 rows in my db table retreived through EF4/L2E. Type Category Product Month1 Month2 Month3 ________________________________________________

Custom View for RecentBlogPosts in Orchard

I've been searching and trying for 2 days to change the view for the RecentBlogPosts content type that appears on my homepage. I want to display the title and a phrase from the posts. I have managed to find a view that shows the title for each post,