Search Results

Search found 1218 results on 49 pages for 'razor shadow'.

Page 4/49 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • RenderPartial from different folder in RAZOR

    - by Dien
    I've been trying to convert my aspx pages to cshtml and having an issue with rendering partial pages from another folder. What I used to do: <% Html.RenderPartial("~/Views/Inquiry/InquiryList.ascx", Model.InquiryList.OrderBy("InquiryId", MvcContrib.Sorting.SortDirection.Descending));%> I would think that the equivalent would be: @Html.RenderPartial("~/Views/Inquiry/_InquiryList.cshtml", Model.InquiryList.OrderBy("InquiryId", MvcContrib.Sorting.SortDirection.Descending)) This is obviously not working, I am getting the following error. CS1973: 'System.Web.Mvc.HtmlHelper' has no applicable method named 'Partial' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax. How would I achieve this with using the Razor view engine?

    Read the article

  • razor intellisense not working on VS2010 for microsoft.web.helpers

    - by pomarc
    I have VS2010 Premium,.NET4.0, MVC3 Tools Update. I've nugetted microsoft-web-helpers successfully. I cannot get @razor intellisense to recognize the microsoft.web.helpers classes. They do work correctely at runtime, i.e. @Twitter.profile shows a profile, but at design time the statent is seen as an error and no members are shown after "." I've tried to add <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> to the <assemblies> element in web.config, but it didn't help. Any idea? thanks.

    Read the article

  • Razor support of generic extension methods

    - by Brian
    Hello, With regards to the Razor view engine, say I want to render Html.TextBoxFor<SomeModel>(i => i.Name), it doesn't seem that the inline syntax works as in: @Html.TextBoxFor<SomeModel>(i => i.Name) This doesn't seem to work because it interprets the generic as an HTML tag. I could use a code-block approach, but then what's the best approach to output the content? The HTML string returned from this method, do I response.write it, or is there a syntax for it, or what's the approach? Thanks.

    Read the article

  • Images with razor asp.net mvc inside JS

    - by sarsnake
    I need to dynamically insert an image in my JS code. In my Razor template I have: @section Includes { <script type="text/javascript"> var imgPath = "@Url.Content("~/Content/img/")"; alert(imgPath); </script> } Then in my JS I have: insertImg = ""; if (response[i].someFlag == 'Y') { insertImg = "<img src=\"" + imgPath + "/imgToInsert.gif\" width=\"6px\" height=\"10px\" />"; } But it doesn't work - it will not find the image. The image is stored in /Content/img folder... What am I doing wrong?

    Read the article

  • Problems using the Razor model when creating my knockout ViewModel

    - by Emil Kantis
    I'm having problems with using the Model in a javascript call when setting up my knockout VM.. @model List<AdminGui.Models.Domain> <script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.2.1.js" type="text/javascript"></script> <script type="text/javascript"> function ViewModel() { var self = this; self.domains = ko.observableArray( ko.utils.arrayMap(@Model, function(item) { return new Domain(item.guid, item.description, item.namespaces); })); } I get a syntax error on @Model in the ko.utils.arrayMap call. I suspect it might be my Razor-fu that is lacking... :)

    Read the article

  • Custom librairies with Razor with the release version of MVC 3

    - by Maxim
    So I'm developing an in-house library for MVC 3 and I want to add it to my project. I added it to my web.config. I added the assembly and added it to the pages - namespaces section and... no. Doesn't work. I tried recompiling, etc... but Razor doesn't like it at all. It's not an intellisense problem... the site can't run if I use my defined namespace. The only way that I made it work was by using the following statements: @using Sample.Helpers I don't want to use it in the pages. I want to be able to deploy it to many projects and adding it to the web.config is definitely the way to go. Anyone ran into this problem?

    Read the article

  • MVC 3 Razor PopUp Window

    - by Vipul
    I need to open a new pop up window on click of a button in a view. The new window should be redirect to a specific actionmethod in a specific controller. I also need to provide attributes for size of the new pop up window. I have been trying the following code: <input type="button" name = "ClickMe" Value="ClickMe" onclick= "javascript:window.open('/Home/Create/','Customer Search',height='window.screen.height - 100', width='200',left='window.screen.width - 250' ,top='10',status='no',toobar='no',resizable='yes',scrollbars='yes')"/> On click of button, nothing happens. I get following Javascript error: Line: 19 Char: 1 Error: Invalid argument. Code: 0 When I check the ViewSource of the HTML rendered, I find the line to be the one which is rendering the button. I am using Windows Vista with IE 7. I am working on MVC 3 with Razor Engine in VS 2010

    Read the article

  • UIView inside UIView with Shadow?

    - by Rnegi
    Hi, I've been trying to figure out how to draw a shadow for an UIView that was added inside a UIView with addSubview. I searched online and read the docs, but the Apple docs simply draw new shapes as shown below. I want to use the Core Graphics to add a shadow to the UIView, but am unsure how to do this to a UIView directly. CGContextRef myContext = UIGraphicsGetCurrentContext(); //CGContextRef myContext = myCGREF; CGSize myShadowOffset = CGSizeMake (10, 10);// 2 CGContextSetShadow (myContext, myShadowOffset, 0); // 3 CGContextBeginTransparencyLayer (myContext, NULL);// 4 // Your drawing code here// 5 CGContextSetRGBFillColor (myContext, 0, 1, 0, 1); CGContextFillRect (myContext, CGRectMake (a_view.frame.origin.x, a_view.frame.origin.y , wd, ht)); CGContextEndTransparencyLayer (myContext);// 6 I know I should put this in the SuperView drawRect method, but I don't know how to make it so it adds a shadow to the views I add in addSubView. Thanks!

    Read the article

  • Making the shadow from a ScatterViewItem a different shape

    - by Vargen
    I am developing a program for Surface using Expression Blend and Visual Studio. I have a custom user control with an ellipse and a label in a grid. This will need to be placed in a scatterViewItem. My problem is that the scatterviewitem will cast a rectangle shaped shadow under the ellipse shaped content. I can disable the shadow completely, but is there any way to make the shadow inherit the shape from its parent? Or can i set the shape of the scatterviewItem itself in any way?

    Read the article

  • UIActionsSheet text shadow problem

    - by AlexVogel
    I have a problem with the text shadow of the UIActionSheet buttons. At iOS 4.0.2 long string were truncated automatically. No at iOS 4.2 these texts are presented with a smaller font. But now the offset of the shadow is corrupted and to big. Is there a possibility to change/remove the text shadow of the UIActionSheet. EDIT: I'm building the UIActionSheet not with initWithTitle:, but with the normal init and sets all needed properties afterwards because the number of possible buttons is dynamic and the texts cannot be change. I've tested it with initWithTitle: and got the same results.

    Read the article

  • How do I create and link to a database in ASP.NET (Razor) with Visual studio 2013?

    - by Blake
    We have a simple web app, part of which allows users to create accounts and then, hopefully soon, to write blog posts. The user log in system is working great, it utilizes the given .sdf database created when a new project is created. We would like to expand it now to allow for blog data (the title, body of the blog, image posts perhaps, etc). However, I'm unsure of how to add another table to the user database for this purpose - or if that would even be best since it has sensitive information in it. I've been reading blog post after blog post and still can't find anything current on this. All of the articles are for MVC projects or older versions of VS. If someone could point me in the right direction it would be greatly appreciated!

    Read the article

  • Using WebMatrix and Visial Studio 2010 on a Razor project

    - by Terrence Koehn
    I am having problems using both WebMatrix and VS on a Razor project. I have downloaded and installed all updates from the official ASP.net web site. After getting the project to compile in VS I get the following error: "The type of page you have requested is not served because it has been explicitly forbidden. The extension '.cshtml' may be incorrect." Now when I open the project in WebMatrix I receive the same error. I can open/run other projects in WebMatrix without errors so apparently VS changed some configuration in my project? Fortunately I have found a work around but the problem is still not solved. 1) Create a new empty folder for site. 2) Copy contents of folder from failing site. 3) In WebMatrix use option "Site From Folder". Once I have the site up and running with the above steps I can delete the original folder, then rename the new folder (which is now working) to the orig name and the site will stop working again. There is some setting on my system tied to the original folder name that is stopping cshtml files from being served. What/Where is that setting? Thanks, Terrence Koehn

    Read the article

  • Remove UIWebView Shadow?

    - by dlewis23
    Does anyone know if its possible to remove the shadow that is placed on the UIWebView window? Example: http://uploadingit.com/files/1173105_olub5/shadow.png If its possible how do you do it? Thanks

    Read the article

  • NIS: which mechanism hides shadow.byname for unpriviledged users?

    - by Mark Salzer
    On some Linux box (SLES 11.1) which is a NIS client I can do as root: ypcat shadow.byname and get output, i.e. some lines with the encrypted passwords, amongst other information. On the same Linux box, if I run the same command as unpriviledged user, I get No such map shadow.byname. Reason: No such map in server's domain Now I am surprised. My good old knowlege says that shadow passwords in NIS are absurd because there is no access control or authentication in the protocol and thus every (unpriviledged) user can access the shadow map and thereby obtain the encrypted passwords. Obviously we have a different picture here. Unfortunately I don't have access to the NIS server to figure out what is happening. My only guess is that the NIS master gives the map only to clients conection from a priviledged port (1024), but this is only an uneducated guess. What mechanisms are there in current NIS implementations to lead to a behavior like the above? How "secure" are they? Can the be circumvented easily? Or are shadow passwords in NIS as secure as the good old shadow files?

    Read the article

  • Using Razor together with ASP.NET Web API

    - by Fredrik N
    On the blog post “If Then, If Then, If Then, MVC” I found the following code example: [HttpGet]public ActionResult List() { var list = new[] { "John", "Pete", "Ben" }; if (Request.AcceptTypes.Contains("application/json")) { return Json(list, JsonRequestBehavior.AllowGet); } if (Request.IsAjaxRequest()) [ return PartialView("_List", list); } return View(list); } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } The code is a ASP.NET MVC Controller where it reuse the same “business” code but returns JSON if the request require JSON, a partial view when the request is an AJAX request or a normal ASP.NET MVC View. The above code may have several reasons to be changed, and also do several things, the code is not closed for modifications. To extend the code with a new way of presenting the model, the code need to be modified. So I started to think about how the above code could be rewritten so it will follow the Single Responsibility and open-close principle. I came up with the following result and with the use of ASP.NET Web API: public String[] Get() { return new[] { "John", "Pete", "Ben" }; } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   It just returns the model, nothing more. The code will do one thing and it will do it well. But it will not solve the problem when it comes to return Views. If we use the ASP.NET Web Api we can get the result as JSON or XML, but not as a partial view or as a ASP.NET MVC view. Wouldn’t it be nice if we could do the following against the Get() method?   Accept: application/json JSON will be returned – Already part of the Web API   Accept: text/html Returns the model as HTML by using a View   The best thing, it’s possible!   By using the RazorEngine I created a custom MediaTypeFormatter (RazorFormatter, code at the end of this blog post) and associate it with the media type “text/html”. I decided to use convention before configuration to decide which Razor view should be used to render the model. To register the formatter I added the following code to Global.asax: GlobalConfiguration.Configuration.Formatters.Add(new RazorFormatter()); Here is an example of a ApiController that just simply returns a model: using System.Web.Http; namespace WebApiRazor.Controllers { public class CustomersController : ApiController { // GET api/values public Customer Get() { return new Customer { Name = "John Doe", Country = "Sweden" }; } } public class Customer { public string Name { get; set; } public string Country { get; set; } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   Because I decided to use convention before configuration I only need to add a view with the same name as the model, Customer.cshtml, here is the example of the View:   <!DOCTYPE html> <html> <head> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> </head> <body> <div id="body"> <section> <div> <hgroup> <h1>Welcome '@Model.Name' to ASP.NET Web API Razor Formatter!</h1> </hgroup> </div> <p> Using the same URL "api/values" but using AJAX: <button>Press to show content!</button> </p> <p> </p> </section> </div> </body> <script type="text/javascript"> $("button").click(function () { $.ajax({ url: '/api/values', type: "GET", contentType: "application/json; charset=utf-8", success: function(data, status, xhr) { alert(data.Name); }, error: function(xhr, status, error) { alert(error); }}); }); </script> </html> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   Now when I open up a browser and enter the following URL: http://localhost/api/customers the above View will be displayed and it will render the model the ApiController returns. If I use Ajax against the same ApiController with the content type set to “json”, the ApiController will now return the model as JSON. Here is a part of a really early prototype of the Razor formatter (The code is far from perfect, just use it for testing). I will rewrite the code and also make it possible to specify an attribute to the returned model, so it can decide which view to be used when the media type is “text/html”, but by default the formatter will use convention: using System; using System.Net.Http.Formatting; namespace WebApiRazor.Models { using System.IO; using System.Net; using System.Net.Http.Headers; using System.Reflection; using System.Threading.Tasks; using RazorEngine; public class RazorFormatter : MediaTypeFormatter { public RazorFormatter() { SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html")); SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/xhtml+xml")); } //... public override Task WriteToStreamAsync( Type type, object value, Stream stream, HttpContentHeaders contentHeaders, TransportContext transportContext) { var task = Task.Factory.StartNew(() => { var viewPath = // Get path to the view by the name of the type var template = File.ReadAllText(viewPath); Razor.Compile(template, type, type.Name); var razor = Razor.Run(type.Name, value); var buf = System.Text.Encoding.Default.GetBytes(razor); stream.Write(buf, 0, buf.Length); stream.Flush(); }); return task; } } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }   Summary By using formatters and the ASP.NET Web API we can easily just extend our code without doing any changes to our ApiControllers when we want to return a new format. This blog post just showed how we can extend the Web API to use Razor to format a returned model into HTML.   If you want to know when I will post more blog posts, please feel free to follow me on twitter:   @fredrikn

    Read the article

  • Add inset box-shadow on Google Maps element

    - by linkyndy
    I am willing to add some inset box-shadow to a tag that is containing a Google Maps element. However, it seems nothing happens, probably because Google loads some other div's in the original element, hence covering the generated box-shadow. How can I achieve this effect? Here's the code I have: <section id="map-container"> <figure id="map"></figure> </section> #map-container { position: relative; float: right; width: 700px; background-color: #F9FAFC; border-top-right-radius: 5px; border-bottom-right-radius: 5px; } #map { position: relative; height: 400px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; box-shadow: 0 1px 0 0 #F6F7FB inset, 0 -1px 0 0 #E0E5E1 inset, 0 -2px 0 0 #EBEBED inset, 0 -3px 0 0 #F4F4F6 inset; } Thank you!

    Read the article

  • Remove panel shadow in KDE 4.8+

    - by Meho R.
    It seems that panel shadow is somehow hardcoded in KDE 4 and devs do not have any plans to change it and/or make it customizable. So, what I'm actually asking is some kind of hack (if there is any) which will remove the shadow of the panel in KDE 4.x completely (but without need to disable all desktop effects in the process). Possible application: When a user wants a completely transparent panel, no top/bottom borders at all, the shadow is completely out of place and destroys the experience.

    Read the article

  • Namespace not found in MVC 3 Razor view

    - by PlTaylor
    I am adding a PagedList to my view and loosely following this Tutorial. I have installed the PagedList reference using Nuget, set up my controller as follows public ViewResult Index(int page = 1) { List<Part> model = this.db.Parts.ToList(); const int pageSize = 20; return View(model.ToPagedList(page, pageSize)); } And written my view with the following model at the top @model PagedList.IPagedList<RIS.Models.Part> When I run the page I get the following error Compiler Error Message: CS0246: The type or namespace name 'PagedList' could not be found (are you missing a using directive or an assembly reference?) Source Error: Line 27: Line 28: Line 29: public class _Page_Areas_Parts_Views_Part_Index_cshtml : System.Web.Mvc.WebViewPage<PagedList.IPagedList<RIS.Models.Part>> { The PagedList dll is being properly loaded in my controller because when I take it out of my view everything works as expected. The CopyLocal property is set to 'True' and I have tried including the namespace in the Views\Web.Config in my specific Area. What else can I do to make the View see the Namespace?

    Read the article

  • Drop shadow coordinate different from iPhone OS 3.2?

    - by Axel
    I'm trying to draw a custom view with a drop shadow. I'm having different results from iPhone OS 3.2. Has the coordinate system changed for CGContextSetShadowWithColor from 3.2? Here is the code I'm using: CGContextRef graphicContext = UIGraphicsGetCurrentContext(); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloat values1[4] = { 0, 0, 0, 1}; CGColorRef blackColor = CGColorCreate (colorspace, values1); CGContextSetShadowWithColor(graphicContext, CGSizeMake(0, -1), 3, blackColor); CGColorRelease(blackColor); CGFloat values2[4] = { .5, .5, 1, 1}; CGColorRef fillColor = CGColorCreate (colorspace, values2); CGContextSetFillColorWithColor(graphicContext, fillColor); CGColorRelease(fillColor); CGContextFillRect(graphicContext,CGRectMake(40, 40, 100, 100)); Here is how it looks on 3.1 and from 3.2. All my views using drop shadow look different depending on the version of iPhone OS. Am I missing something?

    Read the article

  • MVC3 Razor DropDownListFor Enums

    - by jordan.baucke
    Trying to get my project updated to MVC3, something I just can't find: I have a simple datatype of ENUMS: public enum States() { AL,AK,AZ,...WY } Which I want to use as a DropDown/SelectList in my view of a model that contains this datatype: public class FormModel() { public States State {get; set;} } Pretty straight forward: when I go to use the auto-generate view for this partial class, it ignores this type. I need a simple select list that sets the value of the enum as the selected item when I hit submit and process via my AJAX - JSON POST Method. And than the view (???!): <div class="editor-field"> @Html.DropDownListFor(model => model.State, model => model.States) </div> thanks in advance for the advice!

    Read the article

  • Set a dropdown option to selected based on get variable in url in Razor MVC

    - by Mason240
    I have a dropdown menu in a GET form. When the user hits submit, they are directed to the same page and shown the form again. I would like to have the dropdown option the user displayed in the last page already selected. So for example: @Html.DropDownList("Type", null, "Type", new { @class = "sbox-input" } ) website.com/Search?Type="Beef" <select name="Type"> <option value="Fish" >Fish</option> <option value="Chicken" >Chicken</option> <option value="Beef" selected="selected">Beef</option> </select> A jQuery solution would work just as well.

    Read the article

  • MVC3/Razor Client Validation Not firing

    - by Jason Gerstorff
    I am trying to get client validation working in MVC3 using data annotations. I have looked at similar posts including this MVC3 Client side validation not working for the answer. I'm using an EF data model. I created a partial class like this for my validations. [MetadataType(typeof(Post_Validation))] public partial class Post { } public class Post_Validation { [Required(ErrorMessage = "Title is required")] [StringLength(5, ErrorMessage = "Title may not be longer than 5 characters")] public string Title { get; set; } [Required(ErrorMessage = "Text is required")] [DataType(DataType.MultilineText)] public string Text { get; set; } [Required(ErrorMessage = "Publish Date is required")] [DataType(DataType.DateTime)] public DateTime PublishDate { get; set; } } My cshtml page includes the following. <h2>Create</h2> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm()) { @Html.ValidationSummary(true) Post <div class="editor-label"> @Html.LabelFor(model => model.Title) </div> <div class="editor-field"> @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) </div> <div class="editor-label"> @Html.LabelFor(model => model.Text) </div> <div class="editor-field"> @Html.EditorFor(model => model.Text) @Html.ValidationMessageFor(model => model.Text) Web Config: <appSettings> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> Layout: <head> <title>@ViewBag.Title</title> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script> So, the Multiline Text annotation works and creates a text area. But none of the validations work client side. I don't know what i might be missing. Any ideas?? i can post more information if needed. Thanks!

    Read the article

  • Making id'less url in asp.net mvc razor

    - by Sushant
    I am working with URL routing , and have some issues. I want my url to be like this: www.domain.com/p/myproduct But I also want to be able to retrieve the ID of the product, without accessing the database. I thought about having a URL like: www.domain.com/p/myproduct/1 But if I could hide the ID it would be better. So, how do I do it the simplest way? Currently my Global.asax has the following route: routes.MapLocalizedRoute("Product", "p/{productId}/{SeName}", new { controller = "Catalog", action = "Product", SeName = UrlParameter.Optional }, new { productId = @"\d+" }, new[] { "Nop.Web.Controllers" });

    Read the article

  • html code in anchor tag text in c# razor

    - by Tripping
    I am trying to show the rupee sign: ₹ code: &#8377 ; in my anchor tag. I have tried a few things but nothing works ... please help @{ string _text = String.Format("{0} {1} {2} {3} {4}", @Html.DisplayFor(model => model.NoOfBedrooms), "bedroom flat", @Html.DisplayFor(model => model.TransactionTypeDescription), @Html.Raw(&#8377;), @Html.DisplayFor(model => model.Price)); string _rental = ""; if (Model.TransactionType == 2) { _rental = " per month"; } else { _rental = ""; }; string _linkText = _text + _rental; } @Html.ActionLink(_linkText, "Details", "Property", new { id = Model.PropertyId }, null)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >