Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 75/2373 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Adding childs to list of parents with jquery /mvc2

    - by John Landheer
    Hi, I have a table of products on my page, each product has zero or more colors, the colors are shown as a list beneath the product. After the colors I have a button to add a color. The button will do an ajax call with the parent product id to a controller which will return a JSON object with color information. My problem is where to store the product id in the DOM, should I put it in a hidden field and use jquery in the click event of the "add color" to get to it? What is the best way to do this? TIA, John EDIT: The page is initially rendered on the server so I don't want to use jquery to add the id's to the page.

    Read the article

  • asp.net calendar control appears below textfield

    - by user279521
    I ma using an image button to display an asp.net calendar control (this control comes with VS 2008). However, when I click the image button, the calendar controls is displayed "below" the textfield that it is suppoed to populate. How can I get the control to appear on the right side of the textfield? My code is: <asp:ImageButton ID="imgCalendar" runat="server" Height="17px" ImageUrl="~/Images/CAL.gif" onclick="imgCalendar_Click1" Width="19px" Visible="true" ImageAlign="Middle" /> <asp:Panel ID="Panel1" runat="server"> <asp:Calendar ID="calStartDate" runat="server" BackColor="Transparent" BorderColor="#FFCC66" BorderWidth="1px" DayHeaderStyle-BackColor="gainsboro" DayNameFormat="Shortest" FirstDayOfWeek="Monday" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt" ForeColor="Gray" Height="102px" OnSelectionChanged="calStartDate_SelectionChanged" OtherMonthDayStyle-ForeColor="gray" SelectedDayStyle-BackColor="Navy" SelectedDayStyle-Font-Bold="True" SelectorStyle-BackColor="gainsboro" ShowGridLines="True" TitleStyle-BackColor="gray" TitleStyle-Font-Bold="True" TitleStyle-Font-Size="12px" TodayDayStyle-BackColor="gainsboro" Visible="False" Width="62px"> <SelectedDayStyle BackColor="#404040" Font-Bold="True" /> <TodayDayStyle BackColor="#3A080B" ForeColor="White" /> <SelectorStyle BackColor="#FFCC66" /> <OtherMonthDayStyle ForeColor="#CC9966" /> <NextPrevStyle Font-Size="9pt" ForeColor="#3A080B" /> <DayHeaderStyle BackColor="#3A080B" Font-Bold="True" Height="1px" ForeColor="White" /> <TitleStyle BackColor="#E0C16B" Font-Bold="True" Font-Size="9pt" ForeColor="#3A080B" /> </asp:Calendar> </asp:Panel>

    Read the article

  • How can I display an ASP.NET MVC html part from one application in another

    - by Frank Sessions
    We have several asp.net MVC apps in the following setup SecurityApp (root application - handles forms auth for SSO and has a profile edit page) Application1 (virtual directory) Application2 (virtual directory) Application3 (virtual directory) so that domain.com points to SecurityApp and domain.com/Application1 etc point to their associated virtual directories. All of our Single Sign On (SSO) is working properly using forms authentication. Based on the users permissions when logging in a menu that lists their available applications and a logout link will be generated and saved in the cache - this menu displays fine whenever the user is in the SecurityApp (editing their profile) but we cannot figure out how to get the Applications in the virtual directories to display the same application menu. We have tried: 1) Using JSONP to do an request that will return the html for the menu. The ajax call returns the HTML with the html; however, because User.IsAuthenticated is false the menu comes back empty. 2) We created a user control and include it along with the dll's for the SecurityApp project and this works; however, we dont want to have to include all the dlls for the SecurityApp project in every application that we create (along with all the app settings in the web.config) We would like this to be as simple as possible to implement so that anyone creating a new app can add the menu to their application in as few steps as possible... Any ideas? To Clarify - we are using ASP.NET MVC 1.0 since these apps are in production and we do not have the okay to go to ASP.NET MVC 2.0 (unfortunately)

    Read the article

  • Best Template Engine for ASP.NET MVC

    - by OnesimusUnbound
    I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to .Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it. After debugging, I've realized that the $ is used by the StringTemplate to access property, etc and jQuery uses it too to manipulate the DOM. Gee, I've looked on other template engines and most of them uses the dollar sign :(. Any alternative template engine for ASP.Net MVC? I wanted to retain jQuery because MSFT announced that it will used in the Visual Studio (2008?) Thanks in Advance :)

    Read the article

  • ASP.NET membership db using integrated security problem

    - by rem
    I published ASP.NET MVC web site to a server on a virtual machine (Hyper-V). SQL Server Express installed on the same server. The problem is that ASP.Net Membership system doesn't work in integrated mode. When Web.config file contains records as follows: <connectionStrings> <remove name="LocalSqlServer" /> <add name="MyDBConnectionString" connectionString="data source=vm-1\SQLEXPRESS;Initial Catalog=testdb;Integrated Security=SSPI;" providerName="System.Data.SqlClient"/> </connectionStrings> I get an error when trying to register and login to the site. If I change connection string this way: <connectionStrings> <remove name="LocalSqlServer" /> <add name="MyDBConnectionString" connectionString="data source=vm-1\SQLEXPRESS;Initial Catalog=testdb;User ID=XX;Password=XXXXXXX;" providerName="System.Data.SqlClient"/> </connectionStrings> I could register and login without any problem. What could cause the problem with using ASP.NET membership database in integrated security mode?

    Read the article

  • Creating an API for an ASP.NET MVC site with rate-limiting and caching

    - by Maxim Z.
    Recently, I've been very interested in APIs, specifically in how to create them. For the purpose of this question, let's say that I have created an ASP.NET MVC site that has some data on it; I want to create an API for this site. I have multiple questions about this: What type of API should I create? I know that REST and oData APIs are very popular. What are the pros and cons of each, and how do I implement them? From what I understand so far, REST APIs with ASP.NET MVC would just be actions that return JSON instead of Views, and oData APIs are documented here. How do I handle writing? Reading from both API types is quite simple. However, writing is more complex. With the REST approach, I understand that I can use HTTP POST, but how do I implement authentication? Also, with oData, how does writing work in the first place? How do I implement basic rate-limiting and caching? From my past experience with APIs, these are very important things, so that the API server isn't overloaded. What's the best way to set these two things up? Can I get some sample code? Any code that relates to C# and ASP.NET MVC would be appreciated. Thanks in advance! While this is a broad question, I think it's not too broad... :) There are some similar questions to this one that are about APIs, but I haven't found any that directly address the questions I outlined here.

    Read the article

  • ObjectDataSource Insert and Update methods error

    - by Jack
    I m developing asp.net 3.5 project. When I want to Insert with DetailsView this error occured: Error : ObjectDataSource 'ObjectDataSource2' could not find a non-generic method 'AddCity' that has parameters: CITY_NAME. <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetCityByID" UpdateMethod="UpdateCity" InsertMethod="AddCity" TypeName="NOP_CRM.Lib.nop_cities" OldValuesParameterFormatString="original_{0}"> <SelectParameters> <asp:ControlParameter ControlID="GridView1" Name="cityid" PropertyName="SelectedValue" Type="Int32" DefaultValue="1" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="CITY_NAME" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="CITY_NAME" Type="String" /> </InsertParameters> </asp:ObjectDataSource> ... public int AddCity(string cityname) { CITY_NAME = cityname; Insert(); return _CITY_ID; }

    Read the article

  • How to use client side code in Visual studio ASP.NET

    - by Robert
    I am a quite new to web development and I am trying to do some small form updates without causing a postback. For example making a control visible when a drop down list is changed. I have so far come across some features that achieve this like the RequiredFieldValidator inside an update panels. However, these are specific to a single task. What are my options to achieve these client side updates in Visual Studio? At the moment I don't know any JavaScript, so I would prefer another solution if it exists.

    Read the article

  • .NET TDD with a Database and ADO.NET Entity Framework - Integration Tests

    - by Brian
    Hello, I'm using ADO.NET entity framework, and am using an AdventureWorks database attached to my local database server. For unit testing, what approaches have people taken to work with a database? Obviously, the database has to be in a pre-defined state of change so that the tests can have some isolation from each other... so I need to be able to run through the inserts and updates, then rollback either between tests or after the batch of tests are done. Any advice? Thanks.

    Read the article

  • Unobtrusive Client Validation without accepting model

    - by user1010609
    I have simple form like this which accepts only two values string action and editText.Is there a way to enable Unobtrusive Client Validation on this without Data Annotations? Or do I have to accept model and use Data Annotations? I just need it to make sure editText is atleast 5 chars long. @using (Ajax.BeginForm("Action", "Controller", null, new AjaxOptions { OnFailure = "error", UpdateTargetId = "Pcedit" + @Model.ID})) { <textarea rows="3" cols="2" name="editText" style="width:100%;"></textarea> <br /> <input type="submit" name="action" value="Save"/> <input type="submit" name="action" value="Cancel"/> }

    Read the article

  • Run JavaScript code at ASP.NET page load

    - by vaibhav
    I have a radiobox <asp:RadioButtonList CssClass="list" Style="width: 150px" ID="rdo_RSD_ExcerciseRoT" runat="server" Font-Bold="false" RepeatDirection="Horizontal" RepeatLayout="Table" TextAlign="Left" > <asp:ListItem Text="Yes" onclick="en();" Value="Y"></asp:ListItem> <asp:ListItem Text="No" onclick="dis();" Value="N" Selected="True"></asp:ListItem> </asp:RadioButtonList> AS you may see second listitem is selected by default. But issue is, when my page is getting load dis() is not getting called. I want to run dis() on page load too. I tried google, some blogs suggest the use of Page.RegisterStartupScript Method. But I dont exactly know what is the problem and why we should use this above mentioned method. I would appreciate if someone please tell me why this function is not getting called and how to call it. Edit: I am giving Javascript code also, if it helps. <script type="text/javascript"> function dis() { ValidatorEnable(document.getElementById('<%=RequiredFieldValidator32.ClientID%>'), false); } function en() { ValidatorEnable(document.getElementById('<%=RequiredFieldValidator32.ClientID%>'), true); } </script>

    Read the article

  • What is the best logging solution for a C# .NET 3.5 project?

    - by Odd
    My team is about to start a new enterprise wide ASP.NET development project, quite possibly the largest undertaken by my department so far and the largest project that I've ever worked on. I'm looking for a good logging solution for the system. Firstly, what logging tools are currently available and widely used? Secondly, for an ASP.NET (probably MVC) enterprise applicaiton, which tool is most appropriate based on your experience? So far I've used Log4net almost exclusively for all my previous projects. It's a fantastic tool, however I would like to see if there is anything I've not used out there before I start a project of this magnitude or if there is any reason I would not want to use Log4net for a project of this size.

    Read the article

  • response.redirect to classic asp failing

    - by jeff
    I have the following code pasted below. For some reason, the response.redirect seems to be failing and it is maxing out the cpu on my server and just doesn't do anything. The .net code uploads the file fine, but does not redirect to the asp page to do the processing. I know this is absolute rubbish why would you have .net code redirecting to classic asp, it is a legacy app. I have tried putting false or true etc. at the end of the redirect as I have read other people have had issues with this. Please help as it's driving me insane! It's so strange, it runs locally on my machine but won't run on my server! public void btnUploadTheFile_Click(object Source, EventArgs evArgs) { //need to check that the uploaded file is an xls file. string strFileNameOnServer = "PJI3.txt"; string strBaseLocation = ConfigurationSettings.AppSettings["str_file_location"]; if ("" == strFileNameOnServer) { txtOutput.InnerHtml = "Error - a file name must be specified."; return; } if (null != uplTheFile.PostedFile) { try { uplTheFile.PostedFile.SaveAs(strBaseLocation+strFileNameOnServer); txtOutput.InnerHtml = "File <b>" + strBaseLocation+strFileNameOnServer+"</b> uploaded successfully"; Response.Redirect ("/COBRA/pages/sap_import_pji3_prc.asp"); } catch (Exception e) { txtOutput.InnerHtml = "Error saving <b>" + strBaseLocation+strFileNameOnServer+"</b><br>"+ e.ToString(); } } }

    Read the article

  • ASP.NET UpdatePanel PostBacks

    - by Matthew
    I created a marker interface: public interface ISupportAJAXPostsBacks{} I added it to my Page.. public partial class MyWebForm : PageBase, ISupportAJAXPostsBacks I have this check in my PageBase class... if(this is ISupportAJAXPostsBacks) { ... do some stuff ... } If I step through via the debugger, "this is ISupportAJAXPostsBacks" evaluates to true for the initial page load, but evaluates to false when an UpdatePanel posts back on that same page. (scratches head) What is happening under the covers to cause this and what can I do about it?

    Read the article

  • ASP.NET UpdatePanel Time Out

    - by ctrlShiftBryan
    I'm making a request from an UpdatePanel that takes more then 90 seconds. I'm getting this timeout error. "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out." Does anyone know if there is a way to increase the amount of time before the the call times out?

    Read the article

  • Asp.net: Implementing Auto-Logout functionality

    - by renegadeMind
    Hi, I have to implement auto-logout functionality in one of my projects and i just cant figure out where to start looking for ideas but SO. What i need is for the application to redirect the user to the login page if the user session has expired. Please tell me as to what should be my approach to tackle this requirement. Problem Statement: If the user leaves the system for more than n minutes in any given log-in instance, the system should automatically log them off.

    Read the article

  • Keeping cached browser data inside ASP update panel textboxes/dropdowns for browser back click

    - by pmlevere
    I'm new in VB.net/asp and am running a VB web application in a visual database program called IronSpeed designer. I'm primarily using IronSpeed in this case for its login/role security features. I have a basic two page setup for this app. The user logs in then is taken to AccountEntry.aspx, they enter data into textboxes and select some dropdown values that are linked to a sql database, then they click "submit" to move to Results.aspx. On Results.aspx, the user can change data and then generate several types of reports (PDF, Excel, etc). I'm used to setting up ASP controls inside ASPContent areas, and in these areas if a user performs a browser back click the previously entered data will still be on the page for potential user modification. However in this web app, IronSpeed is setting up the page and asp controls inside an asp update panel. It appears inside an asp update panel, cached values can't be seen on a browser back click. In this case, it's important that the orginally entered values still be there for the user experience if the user advances to Results.aspx then clicks browser back to modify a value on AccountEntry.aspx. If I have to I'll setup Session Variables and disable browser clicking, but that is last resort. Is there any way to save cached data inside an asp update panel and have it there for a browser back click?

    Read the article

  • ASP.NET Password textbox, has text as characters entered

    - by SimonNet
    When I look at gmail on my mobile web browser the password textbox hashes the characters as I type so I can see the actual input as I type before is hashed with an asterisk. So as I enter it becomes, P -- *a -- **s etc.. How is this done? I presume its javascript? If somone can point me in the right direction that would be great.

    Read the article

  • asmx web service returning xml instead of json in .net 4.0

    - by Baldy
    i have just upgraded a test copy of my site to asp.net 4.0 and have noticed a strange issue that only arises when i upload the site to my server. the site has an asmx web service that returns json, yet when i run the site on my server it returns xml. it as been working fine in asp.net 3.5 for over a year. the webMethod is decorated with the correct attributes... [WebMethod][ScriptMethod(ResponseFormat = ResponseFormat.Json)] public List<LocationRecentChange> RecentChanges() and on my local machine it returns json. yet on the server (Windows 2008 64bit) it returns xml. you can inspect the response on the test site here... my test site using firebug console you will see a 200 OK response and a bunch of XML, and on my local machine the data returned is the JSON i expect. Here is the javascript that calls the service.. function loadRecentData() { $.ajax({ type: "POST", url: "service/spots.asmx/RecentChanges", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: loadRecentUpdates, failure: function(msg) { //alert(msg); } }); } Any suggestions welcome, this has got me stumped!

    Read the article

  • DropDown Box + Update Panel

    - by bExplosion
    Hey I'm having an issue updating a dropdown box inside of an update panel. Works perfectly if the page posts back, but I'd prefer seemless loading: Here my form code: <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="ajaxClassifications" UpdateMode="Conditional" runat="server"> <ContentTemplate> <td style="font-size: small; color: #003853; width: 50%;"> <asp:DropDownList AutoPostBack="true" ID="ddlClassifications" runat="server" Width="99%" Style="font-size: medium" OnSelectedIndexChanged="ddlClassifications_SelectedIndexChanged"> </asp:DropDownList> </td> <td style="font-size: small; color: #003853; width: 50%;"> <asp:DropDownList ID="ddlSubClassifications" runat="server" Width="99%" Style="font-size: medium"> </asp:DropDownList> </td> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ddlClassifications" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel> Heres the code in my code behind: protected void ddlClassifications_SelectedIndexChanged(object sender, EventArgs e) { ddlSubClassifications.Items.Clear(); getSubClassifications(int.Parse(ddlClassifications.SelectedValue)); } Is there something I am missing here? Thanks in advance!

    Read the article

  • textbox character countdown asp.net

    - by Ugene
    i have many textboxes on a form and all textboxes require to have a character limit / character countdown (50 character left of 150), what is the best way to achieve this and can anyone please provide code to implement. Much Grateful Thanks

    Read the article

  • 'Caching' a large table in ASP.NET

    - by TheNewGuy
    I understand that each page refresh, especially in 'AjaxLand', causes my back-end/code-behind class to be called from scratch... This is a problem because my class (which is a member object in System.Web.UI.Page) contains A LOT of data that it sources from a database. So now every page refresh in AjaxLand is causing me to making large backend DB calls, rather than just to reuse a class object from memory. Any fix for this? Is this where session variables come into play? Are session variables the only option I have to retain an object in memory that is linked to a single-user and a single-session instance?

    Read the article

  • Server Error in '/' Application. - The resource cannot be Found.

    - by Bigced_21
    I am new to ASP.NET MVC 2. I do not understand why I am receiving this error. Is there something missing that i'm not referencing correctly. I'm trying to create a simple jquery autocomplete online search textbox and view the details of the person that i select using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Ajax; using DOC_Kools.Models; namespace DOC_Kools.Controllers { public class HomeController : Controller { private KOOLSEntities _dataModel = new KOOLSEntities(); // // GET: /Home/ public ActionResult Index() { ViewData["Message"] = "Welcome to ASP.NET MVC!"; return View(); } // // GET: /Home/ public ActionResult getAjaxResult(string q) { string searchResult = string.Empty; var offenders = (from o in _dataModel.OffenderSet where o.LastName.Contains(q) orderby o.LastName select o).Take(10); foreach (Offender o in offenders) { searchResult += string.Format("{0}|r\n", o.LastName); } return Content(searchResult); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult Search(string searchTerm) { if (searchTerm == string.Empty) { return View(); } else { // if the search contains only one result return detials // otherwise a list var offenders = from o in _dataModel.OffenderSet where o.LastName.Contains(searchTerm) orderby o.LastName select o; if (offenders.Count() == 0) { return View("not found"); } if (offenders.Count() > 1) { return View("List", offenders); } else { return RedirectToAction("Details", new { id = offenders.First().SPN }); } } } // // GET: /Home/Details/5 public ActionResult Details(int id) { return View(); } // // GET: /Home/Create public ActionResult Create() { return View(); } // // POST: /Home/Create [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here return RedirectToAction("Index"); } catch { return View(); } } // // GET: /Home/Edit/5 public ActionResult Edit(int id) { return View(); } // // POST: /Home/Edit/5 [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here return RedirectToAction("Index"); } catch { return View(); } } public ActionResult About() { return View(); } } } using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace DOC_Kools { // Note: For instructions on enabling IIS6 or IIS7 classic mode, // visit http://go.microsoft.com/?LinkId=9394801 public class MvcApplication : System.Web.HttpApplication { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); routes.MapRoute( "OffenderSearch", "Offenders/Search/{searchTerm}", new { controller = "Home", action = "Index", searchTerm = "" } ); routes.MapRoute( "OffenderAjaxSearch", "Offenders/getAjaxResult/", new { controller = "Home", action = "getAjaxResult" } ); } protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); } } } <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DOC_Kools.Models.Offender>" %> $(document).ready(function() { $("#searchTerm").autocomplete("/Offenders/getAjaxResult/"); }); Home Page <%= Html.Encode(ViewData["Message"]) % <h2>Look for an offender</h2> <form action="/Offenders/Search" method="post" id="searchForm"> <input type="text" name="searchTerm" id="searchTerm" value="" size="10" maxlength="30" /> <input type="submit" value="Search" /> </form> <br /> what do i have to do in order for the textbox search to display on the index page? What else do i have to do for the autocomplete to function correctly. i have the autocomplete.js & jquery.js added to the index.aspx view Any help will be appreciated so that i can get this working. Thanks!

    Read the article

  • Creating vCard action result

    - by DigiMortal
    I added support for vCards to one of my ASP.NET MVC applications. I worked vCard support out as very simple and intelligent solution that fits perfectly to ASP.NET MVC applications. In this posting I will show you how to send vCards out as response to ASP.NET MVC request. We need three things: some vCard class, vCard action result, controller method to test vCard action result. Everything is very simple, let’s get hands on. vCard class As first thing we need vCard class. Last year I introduced vCard class that supports also images. Let’s take this class because it is easy to use and some dirty work is already done for us. NB! Take a look at ASP.NET example in the blog posting referred above. We need it later when we close the topic. Now think about how useful blogging and information sharing with others can be. With this class available at public I saved pretty much time now. :) vCardResult As we have vCard it is now time to write action result that we can use in our controllers. Here’s the code. public class vCardResult : ActionResult {     private vCard _card;       protected vCardResult() { }       public vCardResult(vCard card)     {         _card = card;     }       public override void ExecuteResult(ControllerContext context)     {         var response = context.HttpContext.Response;         response.ContentType = "text/vcard";         response.AddHeader("Content-Disposition", "attachment; fileName=" + _card.FirstName + " " + _card.LastName + ".vcf");           var cardString = _card.ToString();         var inputEncoding = Encoding.Default;         var outputEncoding = Encoding.GetEncoding("windows-1257");         var cardBytes = inputEncoding.GetBytes(cardString);           var outputBytes = Encoding.Convert(inputEncoding,                                 outputEncoding, cardBytes);           response.OutputStream.Write(outputBytes, 0, outputBytes.Length);     } } And we are done. Some notes: vCard is sent to browser as downloadable file (user can save or open it with Outlook or any other e-mail client that supports vCards), File name is made of first and last name of contact. Encoding is important because Outlook may not understand vCards otherwise (don’t know if this problem is solved in Outlook 2010). Using vCardResult in controller Now let’s tale a look at simple controller method that accepts person ID and returns vCardResult. public class ContactsController : Controller {       // ... other controller methods ...       public vCardResult vCard(int id)     {         var person = _partyRepository.GetPersonById(id);         var card = new vCard                 {                     FirstName=person.FirstName,                     LastName = person.LastName,                     StreetAddress = person.StreetAddress,                     City = person.City,                     CountryName = person.Country.Name,                       Mobile = person.Mobile,                     Phone = person.Phone,                     Email = person.Email,                 };           return new vCardResult(card);     } } Now you can run Visual Studio and check out how your vCard is moving from your web application to your e-mail client. Conclusion We took old code that worked well with ASP.NET Forms and we divided it into action result and controller method that uses vCard as bridge between our controller and action result. All functionality is located where it should be and we did nothing complex. We wrote only couple of lines of very easy code to achieve our goal. Do you understand now why I love ASP.NET MVC? :)

    Read the article

  • Unable to get anything except 403 from a .Net 4.5 website

    - by Basic
    Scenario: Clean Server 2008 R2 Install with IIS Role. Installed Framework 3.5 (Server Features) Installed Framework 4.5 RC (MS Download) executed C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i (I'd use -iru on existing servers but this is a clean build). Published via File System (SMB share) Converted the folder into an application using the .Net 4.0 Integrated App Pool Stopped/restarted everything. Browsing to localhost/TestApp results in a 403.14 (Directory browsing forbidden) What step have I missed out? The site in question is MVC4 and targets the 4.5 RC framework

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >