Search Results

Search found 4585 results on 184 pages for 'master subdocument'.

Page 102/184 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • Set Masterpage from Global.asax in ASP.NET

    - by StefanE
    Hi, I want to set the Masterpage property in Global.asax. This is what I have done but I get a NullReferenceException on the first line. Any ideas how to do this? protected void Application_PreSendRequestContent(Object sender, EventArgs e) { System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as System.Web.UI.Page; if (Session["lang"] == "eng") { page.MasterPageFile = "SideMasterPageEng.master"; } }

    Read the article

  • Partial views in asp.net mvc

    - by Renu123
    i am using partial view for my project but my problem is that my links are on right side of masterpage and when i clicked on particular link the view should displayed on left side on contentplace holder of master page. but right now its showing exactly below so my whole disgne is distrubed. so please if anyone know the solution tell me. thanks

    Read the article

  • How to study design patterns?

    - by Alien01
    I have read around 4-5 books on design patterns, but still I dont feel I have come closer to intermediate level in design patterns? How should I go studying design patterns? Is there any best book for design pattern? I know this will come only with experience but there must be some way to master these?

    Read the article

  • How to split long commands over multiple lines in PowerShell

    - by asgerhallas
    How do you take a commmand like this in PowerShell and split it across multiple lines: &"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="c:\workspace\xxx\master\Build\_PublishedWebsites\xxx.Web" -dest:contentPath="c:\websites\xxx\wwwroot\,computerName=192.168.1.1,username=administrator,password=xxx"

    Read the article

  • how to make a base control in silverlight

    - by Edwin Tai
    I have a user control in silverlight which contains both XMAL and .cs file. But I wanna make it into a base control. In other word,I can make a control inherited it whose area in it can be edited. Just like Master Page in asp.net,you know. In the base control,I only have a lot of description in XMAL,perhaps it can be described in the .cs file,too.

    Read the article

  • ASP.NET MVC : Good Replacement for User Control?

    - by David Lively
    I found user controls to be incredibly useful when working with ASP.NET webforms. By encapsulating the code required for displaying a control with the markup, creation of reusable components was very straightforward and very, very useful. While MVC provides convenient separation of concerns, this seems to break encapsulation (ie, you can add a control without adding or using its supporting code, leading to runtime errors). Having to modify a controller every time I add a control to a view seems to me to integrate concerns, not separate them. I'd rather break the purist MVC ideology than give up the benefits of reusable, packaged controls. I need to be able to include components similar to webforms user controls throughout a site, but not for the entire site, and not at a level that belongs in a master page. These components should have their own code not just markup (to interact with the business layer), and it would be great if the page controller didn't need to know about the control. Since MVC user controls don't have codebehind, I can't see a good way to do this. Update FINALLY, a good (and, in retrospect, obvious) way to accomplish this. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace K.ObjectModel.Controls { public class TestControl : ViewUserControl { protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.Write("Hello World"); base.Render(writer); } } } Create a new class which inherits ViewUserControl Override the .Render() method as shown above. Register the control via its associated ASCX as you would in a webForm: <%@ Register TagName="tn" TagPrefix="k" Src="~/Views/Navigation/LeftBar.ascx"%> Use the corresponding tag in whatever view or master page that you need: <k:tn runat="server"/> Make sure your .ascx inherits your new control: <%@ Control Language="C#" Inherits="K.ObjectModel.Controls.TestControl" %> Voila, you're up and running. This is tested with ASP.NET MVC 2, VS 2010 and .NET 4.0. Your custom tag references the ascx partial view, which inherits from the TestControl class. The control then overrides the Render() method, which is called to render the view, giving you complete control over the process from tag to output. Why does everyone try to make this so much harder than it has to be?

    Read the article

  • Jquery problem with errorPlacement.

    - by Eyla
    Greetings, I have problem with errorPlacement, I'm trying to place the error message next to the field but it appearing on the top of the page. any advice how to fix this problem?? here is my code: <%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="IMAM_APPLICATION.WebForm1" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <script src="js/jquery-1.4.1.js" type="text/javascript"></script> <script src="js/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#aspnetForm").validate({ groups: { username: "fname lname", address: "address1 phone" }, errorPlacement: function(error, element) { if (element.attr("name") == "fname" || element.attr("name") == "lname") error.insertAfter("#lastname"); else error.insertAfter(element); }, debug: true }) }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"> <p style="height: 313px"> <label style="position:absolute; top: 227px; left: 22px;">Your Name</label> &nbsp;<input name="fname" value="Pete" style="position:absolute; top: 226px; left: 102px;"/> <input name="lname" id="lastname" style="position:absolute; top: 264px; left: 95px;"/> <input name="address1" style="position:absolute; top: 347px; left: 102px;"/> <input name="phone" id="lastname" style="position:absolute; top: 315px; left: 102px;"/> <br/> <input type="submit" value="Submit Name" style="position:absolute; top: 407px; left: 73px;"/> <input type="submit" value="Submit Address" style="position:absolute; top: 370px; left: 437px;"/> </p> </asp:Content>

    Read the article

  • is there a way to recursively merge then rebase all branches?

    - by yao jiang
    Let's say I have git repo like this: master webapp-1252 webapp-1285 webapp-1384 webapp-1433 webapp-1524 webapp-824 x_____jira_ x_webapp-11 x_webapp-11 x_webapp-11 z_____jira_ I've updated all of them and ready to push them all to svn or something. Then someone makes a quick change that would require me to basically go through all of them to merge etc. Is there a shortcut to go through all the branches I have here, merge them with whatever work that was fetched, then rebase them?

    Read the article

  • How do i append a paper in appendix in latex?

    - by matskn
    In my Master thesis i want to append a paper as an appendix to the thesis. I am writing in LateX in the "report" style. At the end of the thesis there are some code in Appendix A, and in Appendix B i want to add a paper, written in latex. How do i append the paper at the end, as a standalone paper, with its own bibliography etc?

    Read the article

  • ASP.NET masterpage public variables error

    - by eugeneK
    I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage(); ((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage(); which gives me an error like this one Error 3 'System.Web.UI.MasterPage' does not contain a definition for 'MessagePlaceholder' and no extension method 'MessagePlaceholder' accepting a first argument of type 'System.Web.UI.MasterPage' could be found (are you missing a using directive or an assembly reference?) What should i do ?

    Read the article

  • MySQL replication - Should I handle load balancing from my client code (PHP) ?

    - by pirostraktor
    In a MySQL master-slave replication enviroment if I have 4 slave servers how can I execute load balanced select queries? Should I write a PHP class to dealing with the 4 slaves or it is possible to address queries to MySQL's own load balancer solution? Is there a MySQL load balancing solutions? Can I use some other tool to distribute my queries? What is the typical set up in situations like this? Thanks for all answers!

    Read the article

  • wany assignments for java

    - by HW
    Hello, I am a computer science Student Second year ,and i know good deal about c++,Data Structure, File Structure,OOP etc. I decided to learn java i have read couple of books but i know u need practice to master any Programming language so i wonder if anyone could give me the assignments"only the questions not the solution" so that i could solve them as i am getting bored of "hello world"s and "3+2=5"s kinda stuff thanks, ~HW

    Read the article

  • Data retrieval and Join operations with cluster db server

    - by Goerge
    If any database spreads across multiple servers (ex. Microsoft Sql Server), how can we do join or filter operations. In my scenario, if suppose: A single table spreads across multiple servers how can we filter rows based on user input? If master table is there on one db server and transaction table is at another db server, how can we do join operations? Please let me know how can we achieve this and where can I get more details about this?

    Read the article

  • Set Materpage from Global.asax in ASP.NET

    - by StefanE
    Hi, I want to set the Masterpage property in Global.asax. This is what I have done but I get a NullReferenceException on the first line.. Any ideas how to do this? protected void Application_PreSendRequestContent(Object sender, EventArgs e) { System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as System.Web.UI.Page; if (Session["lang"] == "eng") { page.MasterPageFile = "SideMasterPageEng.master"; } }

    Read the article

  • Putting a link to a flash object in a template

    - by aron
    I have a asp.net master page that gets used by pages many /levels/deep/ I will put a link to a flash file in this template. I tried doing it like this but it did not work, what the best practice here? <object width="924" height="200"> <param name="movie" value="/live.swf"> <embed src="/live.swf" width="924" height="200"> </object>

    Read the article

  • When do you use a circular slider/knob in a good user interface?

    - by Koning Baard
    As I am familiar with some synthesizers, I often user real life circular sliders (e.g. to control the master volume), also called knobs. Like this one: Sometimes I also find these controls in virtual applications (yes I like extreme minimalism =P): But most of them are irritating, confusing or just wrong, and simple sliders could be used instead, making the UI much better. What are the advantages of circular sliders like the one in the screenshot above? And when do you use them? Thanks

    Read the article

  • T-SQL Hierarchy to duplicate Dependent Objects tree view in SQL Server 2005

    - by drewg
    Hi Id like to map the calling stack from one master stored procedure through its hundreds of siblings. i can see it in the dialog, but cannot copy or print it, but couldnt trap anythiing worthwhile in proflier. do you know what sproc fills that treeview? i must be a recursive CTE that reads syscomments or information_schema.routines, but its beyond my chops, though i can imagine it thanks in advance drew

    Read the article

  • Development Environment for Testing MySQL Replication

    - by Dave Morris
    Is there an easy way to setup an environment on one machine (or a VM) with MySQL replication? I would like to put together a proof of concept of MySQL replication with one Master write instance and two slave instances for reads. I can see doing it across 2 or 3 VMs running on my computer, but that would really bog down my system. I'd rather have everything running on the same VM. What's the best way to proof out scalability solutions like this in a local dev environment? Thanks for your help, Dave

    Read the article

  • How to discover classes with [Authorize] attributes using Reflection in C#? (or How to build Dynamic

    - by Pretzel
    Maybe I should back-up and widen the scope before diving into the title question... I'm currently writing a web app in ASP.NET MVC 1.0 (although I do have MVC 2.0 installed on my PC, so I'm not exactly restricted to 1.0) -- I've started with the standard MVC project which has your basic "Welcome to ASP.NET MVC" and shows both the [Home] tab and [About] tab in the upper-right corner. Pretty standard, right? I've added 4 new Controller classes, let's call them "Astronomer", "Biologist", "Chemist", and "Physicist". Attached to each new controller class is the [Authorize] attribute. For example, for the BiologistController.cs [Authorize(Roles = "Biologist,Admin")] public class BiologistController : Controller { public ActionResult Index() { return View(); } } These [Authorize] tags naturally limit which user can access different controllers depending on Roles, but I want to dynamically build a Menu at the top of my website in the Site.Master Page based on the Roles the user is a part of. So for example, if JoeUser was a member of Roles "Astronomer" and "Physicist", the navigation menu would say: [Home] [Astronomer] [Physicist] [About] And naturally, it would not list links to "Biologist" or "Chemist" controller Index page. Or if "JohnAdmin" was a member of Role "Admin", links to all 4 controllers would show up in the navigation bar. Ok, you prolly get the idea... Starting with the answer from this StackOverflow topic about Dynamic Menu building in ASP.NET, I'm trying to understand how I would fully implement this. (I'm a newbie and need a little more guidance, so please bare with me.) The answer proposes Extending the Controller class (call it "ExtController") and then have each new WhateverController inherit from ExtController. My conclusion is that I would need to use Reflection in this ExtController Constructor to determine which Classes and Methods have [Authorize] attributes attached to them to determine the Roles. Then using a Static Dictionary, store the Roles and Controllers/Methods in key-value pairs. I imagine it something like this: public class ExtController : Controller { protected static Dictionary<Type,List<string>> ControllerRolesDictionary; protected override void OnActionExecuted(ActionExecutedContext filterContext) { // build list of menu items based on user's permissions, and add it to ViewData IEnumerable<MenuItem> menu = BuildMenu(); ViewData["Menu"] = menu; } private IEnumerable<MenuItem> BuildMenu() { // Code to build a menu SomeRoleProvider rp = new SomeRoleProvider(); foreach (var role in rp.GetRolesForUser(HttpContext.User.Identity.Name)) { } } public ExtController() { // Use this.GetType() to determine if this Controller is already in the Dictionary if (!ControllerRolesDictionary.ContainsKey(this.GetType())) { // If not, use Reflection to add List of Roles to Dictionary // associating with Controller } } } Is this doable? If so, how do I perform Reflection in the ExtController constructor to discover the [Authorize] attribute and related Roles (if any) ALSO! Feel free to go out-of-scope on this question and suggest an alternate way of solving this "Dynamic Site.Master Menu based on Roles" problem. I'm the first to admit that this may not be the best approach.

    Read the article

  • Show Color on WrkStat.aspx Page

    - by eru
    On the WrkStat.aspx page I would like to add emphasis to the status of each approval stage. e.g. I want to show "Approved" in green and "Rejected" text in red. I tried editing the page in SharePoint Designer but it gives an error about application.master. Does anyone know how to add color to this wrkstat.aspx page or any custom workflow status page?

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >