Search Results

Search found 57033 results on 2282 pages for 'asp net mvc 2 metadata'.

Page 51/2282 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • ASP.NET MVC, How to get the page content before render

    - by user361993
    In ASP.NET MVC, how to get the page content before render, we know in Web form app, we can override the method protected override void Render(HtmlTextWriter writer) to get the page content before render. but in MVC there are no event concept, so how we can get the page content. the purpose for that is to emphasize(wrap <strong> tag) the keywords before the page rendered. I'd appreciate for any advice. Thank you.

    Read the article

  • SSL pages under ASP.NET MVC

    - by David Laing
    How do I go about using HTTPS for some of the pages in my ASP.NET MVC based site? Steve Sanderson has a pretty good tutorial on how to do this in a DRY way on Preview 4 at: http://blog.codeville.net/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/ Is there a better / updated way with Preview 5?,

    Read the article

  • Why use VB.Net instead C#?

    - by HasanGursoy
    A big company says "Minimal knowledge not to ask why don't you use C#" in its job requirements. And as a C# coder I wonder why do they prefer vb.net instead of C#. Also a Microsoft MVP uses vb.net in his Silverlight applications. Is there something Microsoft won't tell us?

    Read the article

  • Why use VB.Net instead of C#?

    - by HasanGursoy
    A big company says "Minimal knowledge not to ask why don't you use C#" in its job requirements. And as a C# coder I wonder why do they prefer vb.net instead of C#. Also a Microsoft MVP uses vb.net in his Silverlight applications. Is there something Microsoft won't tell us?

    Read the article

  • Asp.Net MVC missing style and defaults to logon page

    - by user279750
    I just setup an out of the box "W2K8 R2 Web" server and installed IIS 7 out of the box. Then I installed the .NET4 framework and ran "aspnet_regiis -i" command. I created a site using .NET 4.0 Integrated app pool. I created an MVC application using the default MVC project template, without modifying I compiled the project and deploy the files using (Publish) to the virtual directory. I can pull the site up, but the styles are missing from the page and for some reason it routing to the /Account/LogOn?ReturnUrl=/

    Read the article

  • ASP.NET MVC vs. WebForms - a simple question

    - by Tony
    Hi, I'm wondering about one thing - as we know, the MVC pattern is stateless (it doesn't use the ViewState, so we use only HTML controls), but if we use them in WebForms as well, it'll become stateless too ? so, by doing this, we are getting closer to the MVC pattern ?

    Read the article

  • ASP.NET MVC 2 - Setting id of Html.Form

    - by Justin
    Hey, How do you set the id of an Html.Form in ASP.NET MVC 2? I tried this: <% using (Html.BeginForm("Save", "Clients", new { id = "SubmitForm" })) {%> But it doesn't work, my form still doesn't have an id property: <form action="/TothSolutions/Secure/Clients/Save/SubmitForm" method="post"> I'm guessing this worked in ASP.NET MVC 1 but not 2. The reason I need the id property set is so that I can do jQuery validation on the form: $("#myForm").validate etc... Thanks, Justin

    Read the article

  • Unit testing MVC.net Redirection

    - by Dan
    How do I Unit Test a MVC redirection? public ActionResult Create(Product product) { _productTask.Save(product); return RedirectToAction("Success"); } public ActionResult Success() { return View(); } Is Ayende's approach still the best way to go, with preview 5: public static void RenderView(this Controller self, string action) { typeof(Controller).GetMethod("RenderView").Invoke(self,new object[] { action} ); } Seems odd to have to do this, especially as the MVC team have said they are writing the framework to be testable.

    Read the article

  • ASP.NET MVC 2.0 Copy ViewModel to Business Objects

    - by azamsharp
    I am using ASP.NET MVC 2.0 and I want to transfer my ViewModel properties to business object. I can do this manually or use AutoMapper or use new method available in ASP.NET MVC 2.0. My question is that does anyone know the name of the new method which allows to copy the properties from one object to another?

    Read the article

  • VS2010 MSTest CruiseControl.NET .NET 3.5

    - by Bill Campbell
    Hi, We're in the process of upgrading from VS2008 to VS2010 since it's now released. We are using CC.NET along with MSTest and want to use MS coverage tool instead of NCover. Interestingly, as I've seen others talking about as well, when you upgrade your project from VS2008 to VS2010 your Test Projects get converted to .NET 4. Nice move!! So WTF does one do with their CI environment in order to build this stuff (some projects in .net 3.5, some in .net 4 - these are different FRAMEWORKS!) LOL!!! It seems that I might need to have my CC.NET build two separate projects? - not sure about how to run the units tests from cruise with .net 4. Has anyone done this and have a snippet of their config they might share? And I thought this was going to be a simple thing. :( thanks! Bill44077

    Read the article

  • ADO.NET Entity Framework or ADO.NET

    - by sharru
    I'm starting a new project based on ASP.NET and Windows server. The application is planned to be pretty big and serve large amount of clients pulling and updating high freq. changing data. I have previously created projects with Linq-To-Sql or with Ado.Net. My plan for this project is to use VS2010 and the new EF4 framework. It would be great to hear other programmers options about development with Entity Framework Pros and cons from previous experience? Do you think EF4 is ready for production? Should i take the risk or just stick with plain old good ADO.NET?

    Read the article

  • Drop Down Box and other stuff in ASP.NET with VB.NET (VS 2008)

    - by typoknig
    Hi all, I am trying to polish up a program a program that I have converted from a Windows Form in to an ASP.NET Web Application. I have several questions: 1.) I have a drop down box where users can select their variables, but users can also enter their variables manually into various text fields. What I want is for the drop down box to show a string like "Choose Variables" when ever the user enters their variables manually. I want this to happen without having to reload the page. 2.) In the Windows Form version of this application I had a RichTextBox that populated with data (line by line) after a calculation was made. I used "AppendText" in my Windows Form, but that is not available in ASP.NET, and neither is the RichTextBox. I am open to suggestions here, I tried to use just a text box but that isn't working right. 3.) In my Windows Form application I was using "KeyPress" events to prevent incorrect characters from being entered into the text fields. My code for these events looked similar to this: Private Sub TextBox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox.KeyPress If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back AndAlso e.KeyChar <> "." Then e.Handled = True End If End Sub How can I make this work again... also without reloading the page. 4.) This is not a major issue, but I would like all of the text to be selected when the cursor enters a field. In my Windows Form application I used "SelectAll", but again, that is not available in ASP.NET Thanks in advanced.

    Read the article

  • Business rule validation of hierarchical list of objects ASP.NET MVC

    - by SergeanT
    I have a list of objects that are organized in a tree using a Depth property: public class Quota { [Range(0, int.MaxValue, ErrorMessage = "Please enter an amount above zero.")] public int Amount { get; set; } public int Depth { get; set; } [Required] [RegularExpression("^[a-zA-Z]+$")] public string Origin { get; set; } // ... another properties with validation attributes } For data example (amount - origin) 100 originA 200 originB 50 originC 150 originD the model data looks like: IList<Quota> model = new List<Quota>(); model.Add(new Quota{ Amount = 100, Depth = 0, Origin = "originA"); model.Add(new Quota{ Amount = 200, Depth = 0, Origin = "originB"); model.Add(new Quota{ Amount = 50, Depth = 1, Origin = "originC"); model.Add(new Quota{ Amount = 150, Depth = 1, Orinig = "originD"); Editing of the list Then I use Editing a variable length list, ASP.NET MVC 2-style to raise editing of the list. Controller actions QuotaController.cs: public class QuotaController : Controller { // // GET: /Quota/EditList public ActionResult EditList() { IList<Quota> model = // ... assigments as in example above; return View(viewModel); } // // POST: /Quota/EditList [HttpPost] public ActionResult EditList(IList<Quota> quotas) { if (ModelState.IsValid) { // ... save logic return RedirectToAction("Details"); } return View(quotas); // Redisplay the form with errors } // ... other controller actions } View EditList.aspx: <%@ Page Title="" Language="C#" ... Inherits="System.Web.Mvc.ViewPage<IList<Quota>>" %> ... <h2>Edit Quotas</h2> <%=Html.ValidationSummary("Fix errors:") %> <% using (Html.BeginForm()) { foreach (var quota in Model) { Html.RenderPartial("QuotaEditorRow", quota); } %> <% } %> ... Partial View QuotaEditorRow.ascx: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Quota>" %> <div class="quotas" style="margin-left: <%=Model.Depth*45 %>px"> <% using (Html.BeginCollectionItem("Quotas")) { %> <%=Html.HiddenFor(m=>m.Id) %> <%=Html.HiddenFor(m=>m.Depth) %> <%=Html.TextBoxFor(m=>m.Amount, new {@class = "number", size = 5})%> <%=Html.ValidationMessageFor(m=>m.Amount) %> Origin: <%=Html.TextBoxFor(m=>m.Origin)%> <%=Html.ValidationMessageFor(m=>m.Origin) %> ... <% } %> </div> Business rule validation How do I implement validation of business rule: Amount of quota and sum of amounts of nested quotas should equal (e.a. 200 = 50 + 150 in example)? I want to appropriate inputs Html.TextBoxFor(m=>m.Amount) be highlighted red if the rule is broken for it. In example if user enters not 200, but 201 - it should be red on submit. Using sever validation only. Thanks a lot for any advise.

    Read the article

  • how can get data from another Table

    - by Pushpendra Kuntal
    I am designing a project in asp.net mvc3, i have designed my database in sql server, add i am using ado.net. This is my controller action public ViewResult ProductFormulationIndex() { return View(db.ProductFormulation.ToList()); } means i want to display all fields of ProductFormulation table. this is my table:- and this is my productCategory Table in my ProductFormulationIndex.cshtml i want to display Code of ProductCategory Table, not only id. So what should i do in controller or in Model for it ? you may suggest tutorial related to it. Thanks in advance.

    Read the article

  • Passing Data from Usercontrol to controller

    - by nitinkhanna
    Hi, I am new to MVC, and trying something and got stuck somewhere in between. I have a user control there I have three textbox html type(ID, Lastname, firstname) and a submit buttom. I set the button like <input type="button" value="Search" onclick="location.href='<%= Url.Action("action", "controller") %>'" /> I have called this usercontrol on some view through <%= Html.Partial("ucName") %> Now on pressing that button(on user control) I need to pass the data from these textboxes to controller again to some specific action(Http Post action). By using this data I want to do some database interaction and storing the result in a dataset and pass this data set to same view again to show up in some Grid. I know the first part in conventional Asp.net can be done by raising the event through delegate but don't know how to do that in MVC.

    Read the article

  • Interesting links week #10

    - by erwin21
    Below a list of interesting links that I found this week: Interaction: The Ultimate 20 Usability Tips for Your Website Frontend: Adobe Releases Flash-to-HTML5 Converter, Codenamed Wallaby Development: 10 Tips for Decreasing Web Page Load Times Ten Things Every WordPress Plugin Developer Should Know Progressive enhancement tutorial with ASP.NET MVC 3 and jQuery Marketing: 5 Tips for SEO & User-Friendly Copy Other: Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    Read the article

  • Interesting links week #51 and #52

    - by erwin21
    Below a list of interesting links that I found this week: Frontend: How to Create a Mobile Version of Your Website 10 tricks that will make your jQuery enabled site go faster Tools and Resources to Test Cross Browser Compatibility of Your Websites 9 Websites to Learn the Basics About html 5 Development: Online web.config security analyzer tool Using 51Degrees.Mobi Foundation for accurate mobile browser detection on ASP.NET MVC 3 Interested in more interesting links follow me at twitter http://twitter.com/erwingriekspoor

    Read the article

  • Getting table schema from a query

    - by Appu
    As per MSDN, SqlDataReader.GetSchemaTable returns column metadata for the query executed. I am wondering is there a similar method that will give table metadata for the given query? I mean what tables are involved and what aliases it has got. In my application, I get the query and I need to append the where clause programically. Using GetSchemaTable(), I can get the column metadata and the table it belongs to. But even though table has aliases, it still return the real table name. Is there a way to get the aliase name for that table? Following code shows getting the column metadata. const string connectionString = "your_connection_string"; string sql = "select c.id as s,c.firstname from contact as c"; using(SqlConnection connection = new SqlConnection(connectionString)) using(SqlCommand command = new SqlCommand(sql, connection)) { connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.KeyInfo); DataTable schema = reader.GetSchemaTable(); foreach (DataRow row in schema.Rows) { foreach (DataColumn column in schema.Columns) { Console.WriteLine(column.ColumnName + " = " + row[column]); } Console.WriteLine("----------------------------------------"); } Console.Read(); } This will give me details of columns correctly. But when I see BaseTableName for column Id, it is giving contact rather than the alias name c. Is there any way to get the table schema and aliases from a query like the above? Any help would be great!

    Read the article

  • Read/Modify PDF Metadata using iTextSharp

    - by muruge
    Hello, I am trying to use iTextSharp to read/modify PDF metadata. I figured out how to do it using pdfreader and pdfstamper. I was wondering if I could also read/modify additional metadata information like copyright information and few others within the XMP photoshop namespace. I would greatly appreciate any pointers to the solution. Thank you, Murugesh.

    Read the article

  • Redefine folder structure of document library with metadata

    - by Sachin
    Hi all, I have a problem in my sharepoint document library structure. Currently the document library consiste of folder sub-folder structure to store a document categorywise. Now our client want to redefine this folder structure with a metadata structure. Can any one tell me how can I use metadata instade of folder sub folder structure..? any related articles or links will be appriciated. Thanks Sachin

    Read the article

  • Performance Related features for migration from .net 2003 Framework 1.1 to .net 2008 framework 3.5?

    - by KuldipMCA
    I am work on VB.net 2003 Framework 1.1 for last 3.5 years in windows Application. We are currently migrating to VB.net 2008 framework 3.5, but i don't know about the features which related to ADO.net and which is important to performance. I know linq to SQL but our architecture is made in .net 2003 so we should follow this. Any features which is very important to enhance the performance?

    Read the article

  • ASP.NET Elements are null when assigning data source

    - by deccks
    For some reason, all of the objects in my ASP.NET markup are now null when I try to assign values to their properties in the code behind. My project was going fine and then now when I try to assign a data source to a GridView, I get a null reference error. I have no idea why it's doing this. I am not doing nothing special. I am just trying to assign a value to a property to an asp.net element in on the page. The intellisense knows that the element is there and I get no errors when I build the project. It's just when I am running the website I get the null reference. I have been trying to fix this issue for a couple weeks now. Please Help. Thanks. Here is the code: protected void Page_PreRender(object sender, EventArgs e) { LoadData(); } private void LoadData() { Entities context = new Entities(); var types = (from t in context.CustomerTypes select t).OrderBy(t => t.TypeName); gvCustomerTypes.DataSource = types; gvCustomerTypes.DataBind(); } and on in the markup the gridview looks like this: <asp:GridView ID="gvCustomerTypes" runat="server" ShowHeader="true" GridLines="Both" AutoGenerateColumns="false" AlternatingRowStyle-BackColor="AliceBlue" Width="100%"> <Columns> <asp:TemplateField HeaderText="Customer Type Name" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <ItemTemplate> <asp:Label ID="lblType" runat="server" Text='<%# Eval("TypeName") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:HyperLink ID="HyperLink1" NavigateUrl='<%#Eval("CustomerTypeID", "CreateEditCustomerType.aspx?ID={0}") %>' Text="Edit" runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:LinkButton ID="LinkButton1" CommandName='<%#Eval("CustomerTypeID") %>' OnClientClick="javascript:return confirm('Are you sure you want to delete this Customer Type?');" OnCommand="DeleteCustomerType" Text="Delete" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>

    Read the article

  • RUN 2012 Buenos Aires - Desarrollando para dispositivos móviles con HTML5 y ASP.NET

    - by MarianoS
    El próximo Viernes 23 de Marzo a las 8:30 hs en la Universidad Católica Argentina se realizará una nueva edición del Run en Buenos Aires, el evento Microsoft más importante del año. Particularmente, voy a estar junto con Rodolfo Finochietti e Ignacio Lopez presentando nuestra charla “Desarrollando para dispositivos móviles con HTML5 y ASP.NET” donde voy a presentar algunas novedades de ASP.NET MVC 4. Esta es la agenda completa de sesiones para Desarrolladores: Keynote: Un mundo de dispositivos conectados. Aplicaciones al alcance de tu mano: Windows Phone – Ariel Schapiro, Miguel Saez. Desarrollando para dispositivos móviles con HTML5 y ASP.NET – Ignacio Lopez, Rodolfo Finochietti, Mariano Sánchez. Servicios en la Nube con Windows Azure – Matias Woloski, Johnny Halife. Desarrollo Estilo Metro en Windows 8 – Martin Salias, Miguel Saez, Adrian Eidelman, Rubén Altman, Damian Martinez Gelabert. El evento es gratuito, con registro previo: http://bit.ly/registracionrunargdev

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >