asp.net-mvc

create Plist in .net from list of objects

I am working on an iPad app that is fed data via web service returning JSON. Watching some iTunes U episodes, it looks like sending back Plist would save me a ton of time and speed up my app quite a bit on the parsing side of things. Does anyone know of a .net library that converts objects into this Plist to return instead? EDIT (this...

How to programmatically load a HTML document in order to add to the document's <head>?

We are supplied with HTML 'wrapper' files from the client, which we need to insert out content into, and then render the HTML. Before we render the HTML with our content inserted, I need to add a few tags to the <head> section of the client's wrapper, such as references to our script files, css and some meta tags. So what I'm doing is ...

How to add <link> or <meta> tags to <head> with HtmlAgilityPack?

The link to download documentation from http://htmlagilitypack.codeplex.com is returning an error and I can't figure this out by trying the code. I'm trying to insert various tags into the <head> section of a HtmlDocument that I've loaded from a HTML string. The original issue I'm having is described here. Can somebody give me an idea ...

jQuery Tools: How to prevent a submit event from a form that is rendered dynamically into a page

I have an Index.aspx page with a button. If you click the button a create overlay pops up. In this overlay lies the form. So the create overlay form page and the Index.aspx are seperated. The whole form is rendered into the Index.aspx using jQuery Overlay plugin from http://flowplayer.org/tools/overlay/index.html (in $(document).ready(fu...

Client recaptcha doesnt help much...

Hi all, I am using recaptcha with jquery and ajax to protect a form in a website i m working on. But i think i am missing something cause a spam bot will simply post directly to the form handler right? what can i do then? I really need to keep the recaptcha control on a modal dialog for several reasons one of which is screen real esta...

Dynamic Images in MVC (Stack Exchange Beta sites)

Hi I've been looking at the Stack Exchange Beta sites and noticed that each site that goes into beta has a graphic at the top with the words 'Web Applications Beta' or 'Gaming Beta' for example. I wondered if these images are individually created or if the are created dynamically somehow? Is there a way using MVC.NET to create PNGs on...

Send Two Models into One View .Net in VB

Edit one more time: So it looks like I have figured out the address part too, in the class I have: Public ReadOnly Property addresses As IEnumerable(Of Address) Get Return _these_addresses End Get End Property And in the template I have: <% For Each item In Model.addresses%> <tr> ...

Castle windsor Nhibernate Facility cCastle.Facilities.NHibernateIntegration.ISessionManager which was not registered.

Hi Iam having some trouble getting castle Nhibernate facility up and running properly. This error I guess makes sense because the Nhbernate repository constructor takes in an ISessionManager as a constructor argument, my question is does castle not inject this dependency? or is there something wrong with my configuration UserServiceTest...

Access Windows Search index using ASP.NET MVC

I'm on a project that is being upgraded from vbscript to ASP.NET MVC. It used Microsoft Index Server to index Word and PDF files on a Windows Server 2003 machine. It simply opened an OleDbConnection using a connection string like "Provider=\"MSIDXS\";Data Source=\"docSearch\";". After researching a bit, I learned that Index Server is ob...

How do I get the value of an input of html.textbox in ASP.NET MVC 2

Hello all, I currently have a TextBox using: <%: Html.TextBox("TextBox1") %> How do I get the value of what is typed into the TextBox as a string so that I can use that string variable throughout my application? The view has he following with the inherits on top of page to model. This page is named "InputNumbersSection": <%: Html.Te...

Validation of viewstate MAC failed error

Trying to run the reportviewer with passing the parameter but receive error: Validation of viewstate MAC failed error (ASP.NET MVC) Have tried the following but no luck: added the machine key (http://aspnetresources.com/tools/machineKey) to the system.web tag in web.config set enableEventValidation="false" to the pages tag in web...

hide <th> and <td> tag

<table class="display" id="jquerytable"> <thead> <tr> <th>Name</th> <th>BillingAddress</th> <th>DeliveryAddress</th> <th>Eng 1</th> <th>Eng 2</th> </tr> </thead> <tbody> <% foreach (var item in Model) { %> <tr> <td><%= Html.Encode(item.Name) %></td> <td><%= Html.Encode(item....

Generate PDF document based on Word document

Hello, I’d like in an ASP.NET MVC application generate document (invoice for example) based on a word document than I use as template. I create a word document with : Some fix data : Company info Logo general layout Some data to add in a specific place : Invoice number A section with a table, with some column (price, quantity, ...

Alternative way to use ViewData in the View of an ASP.Net MVC Application

Hi, I am have been working on an ASP.NET Application. When passing data from the Controller to the View I have been doing the following- <%foreach(myModel classified in(IQueryable<MyModel>)ViewData["Classifieds"]) {%> <p><span class="Bold">Title:</span> <%: classified.Header %></p> <p><span class="Bold">Price: £ </span><%...

Filtering a List view in an ASP.MVC application.

I would like to implement filtering in a List view based on the value in a DropDownList, in a sort of 'postback' call, where the user selects dropdown values and clicks a Refresh button. I have figured out that I should use my ViewData for the model being listed, but how do I pass the selected values back to the Index override that take...

MvcContrib.UI.Grid pagination problem

Hi, I have an object which contains quite a few other objects in an IList called possible values. I have successfully used the mvccontrib grid plus paging before but would like to add the grid to the object’s page – hope you know what I mean. So I did something like this in my controller: [AcceptVerbs(HttpVerbs.Get)] public ViewResult ...

hidden field not updating Ajax.BeginForm Html.Hidden

When I submit my form using Ajax.BeginFrom everything seems to work and update fine but the ID. The ID is calculated in the server and send back to the partial page but the page is not updating the hidden field ID. I know the ajax works because the messages generated in the server get displayed in the page so there's something I can't un...

ASP.NET MVC Model Binder not working with a dictionary

Hi, Given the following view model and action using the DefaultModelBinder, it seems to ignore the dictionary, but bind all other properties correctly. Am I missing something here? Looking at the MVC source code this seems legit. Thanks public class SomeViewModel { public SomeViewModel() { SomeDictionary = new Dictiona...

what type does my object query return?

Public Function List_category() As Myobj Dim query = From subcat In _dataContext.subcategories, _ cat In _dataContext.categories _ Where subcat.CategoryID = cat.CategoryID _ Select New Myobj() With { _ .SubcatId = subcat.SubCategoryID, _ .SubcatName = subcat.SubCategoryName, _ ...

setting displayname data annotation dynamically in asp.net mvc

I have a database table with the following fields item_key, item_value, display_name, uihint I want to be able to specify in the database table which displaytemplate to use and also the displayname. <%= Html.EditorFor(p=>pageField.item_value, pageField.uihint) %> The UIHint is working, but I can't work out a way of setting the disp...