Search Results

Search found 5011 results on 201 pages for 'grand master t'.

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

  • How to insert records in master/detail relationship

    - by croceldon
    I have two tables: OutputPackages (master) |PackageID| OutputItems (detail) |ItemID|PackageID| OutputItems has an index called 'idxPackage' set on the PackageID column. ItemID is set to auto increment. Here's the code I'm using to insert masters/details into these tables: //fill packages table for i := 1 to 10 do begin Package := TfPackage(dlgSummary.fcPackageForms.Forms[i]); if Package.PackageLoaded then begin with tblOutputPackages do begin Insert; FieldByName('PackageID').AsInteger := Package.ourNum; FieldByName('Description').AsString := Package.Title; FieldByName('Total').AsCurrency := Package.Total; Post; end; //fill items table for ii := 1 to 10 do begin Item := TfPackagedItemEdit(Package.fc.Forms[ii]); if Item.Activated then begin with tblOutputItems do begin Append; FieldByName('PackageID').AsInteger := Package.ourNum; FieldByName('Description').AsString := Item.Description; FieldByName('Comment').AsString := Item.Comment; FieldByName('Price').AsCurrency := Item.Price; Post; //this causes the primary key exception end; end; end; end; This works fine as long as I don't mess with the MasterSource/MasterFields properties in the IDE. But once I set it, and run this code I get an error that says I've got a duplicate primary key 'ItemID'. I'm not sure what's going on - this is my first foray into master/detail, so something may be setup wrong. I'm using ComponentAce's Absolute Database for this project. How can I get this to insert properly? Update Ok, I removed the primary key restraint in my db, and I see that for some reason, the autoincrement feature of the OutputItems table isn't working like I expected. Here's how the OutputItems table looks after running the above code: ItemID|PackageID| 1 |1 | 1 |1 | 2 |2 | 2 |2 | I still don't see why all the ItemID values aren't unique.... Any ideas?

    Read the article

  • MySQL Replication Over SSH - Last_IO_Errno: 2003 - error connecting to master

    - by Dom
    I have MySQL MASTER/SLAVE replication working on two test boxes (Centos 6.4 / MySQL 5.5.32) over LAN. Securing the connection over ssh causes connection problems from the SLAVE machine: (Sample of show slave status \G Output) Last_IO_Errno: 2003 Last_IO_Error: error connecting to master '[email protected]:3305' - retry-time: 60 I have granted the replication user the relevant privileges on the master server with both 127.0.0.1 and the network IP. I have forwarded the port from slave to master over SSH ssh -f 192.168.0.128 -L 3305:192.168.0.128:3306 -N I can connect to master MySQL from slave with mysql -urep -ppassword -h127.0.0.1 -P3305 The master server setup would seem fine, as it works without a tunnel, and the tunnel seems fine, as I can connect to MySQL between the two. Change Master Statement: CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3305, MASTER_USER='rep', MASTER_PASSWORD='password'; Note: I know there are reasons to use SSL, instead of SSH, but I have reasons why SSH is a better choice for my setup.

    Read the article

  • ASP.NET MVC Master Page

    - by john
    hi Guys How can one do this? I would like to save the master pages template in the database and then based on a query string pull the correct template. Is this possible?

    Read the article

  • ASP.NET Master Page + pageLoad() = kills jquery?

    - by Clay Angelly
    In my MasterPage, I have a ScriptManager that has a ScriptReference to my jquery.js file. This has always worked with no problems, all content pages that utilize jquery work fine. Recently, I added the following javascript script block at the end of my MasterPage: function pageLoad(sender, args) { } By simply adding the above pageLoad method, no jquery code is executed from any of my content pages. Why would just having a pageLoad in the Master Page have this effect? Thanks in advance for any insight.

    Read the article

  • Spark View Engine: How to set default master page name?

    - by Dave
    I use Spark View Engine with nested master pages. I have Application.spark which defines the basic layout of the website. Then there are several other masters which themselves use Application.spark as master page (Default.spark, SinlgeColumn.spark, Gallery.spark, ...) If no master page is specified in a view file, then automatically Application.spark is choosen by the Spark View Engine. Since almost all my pages use "Default.spark" as master, is there a way to configure this globally? The other possibilities would be: Set the master in each spark file individually <use master="Default" />. But that's really annoying. Rename my master files (Default.spark <- Application.spark) but that really doesn't make any sense in naming.

    Read the article

  • Metro: Creating a Master/Detail View with a WinJS ListView Control

    - by Stephen.Walther
    The goal of this blog entry is to explain how you can create a simple master/detail view by using the WinJS ListView and Template controls. In particular, I explain how you can use a ListView control to display a list of movies and how you can use a Template control to display the details of the selected movie. Creating a master/detail view requires completing the following four steps: Create the data source – The data source contains the list of movies. Declare the ListView control – The ListView control displays the entire list of movies. It is the master part of the master/detail view. Declare the Details Template control – The Details Template control displays the details for the selected movie. It is the details part of the master/detail view. Handle the selectionchanged event – You handle the selectionchanged event to display the details for a movie when a new movie is selected. Creating the Data Source There is nothing special about our data source. We initialize a WinJS.Binding.List object to represent a list of movies: (function () { "use strict"; var movies = new WinJS.Binding.List([ { title: "Star Wars", director: "Lucas"}, { title: "Shrek", director: "Adamson" }, { title: "Star Trek", director: "Abrams" }, { title: "Spiderman", director: "Raimi" }, { title: "Memento", director: "Nolan" }, { title: "Minority Report", director: "Spielberg" } ]); // Expose the data source WinJS.Namespace.define("ListViewDemos", { movies: movies }); })(); The data source is exposed to the rest of our application with the name ListViewDemos.movies. Declaring the ListView Control The ListView control is declared with the following markup: <div id="movieList" data-win-control="WinJS.UI.ListView" data-win-options="{ itemDataSource: ListViewDemos.movies.dataSource, itemTemplate: select('#masterItemTemplate'), tapBehavior: 'directSelect', selectionMode: 'single', layout: { type: WinJS.UI.ListLayout } }"> </div> The data-win-options attribute is used to set the following properties of the ListView control: itemDataSource – The ListView is bound to the list of movies which we created in the previous section. Notice that the ListView is bound to ListViewDemos.movies.dataSource and not just ListViewDemos.movies. itemTemplate – The item template contains the template used for rendering each item in the ListView. The markup for this template is included below. tabBehavior – This enumeration determines what happens when you tap or click on an item in the ListView. The possible values are directSelect, toggleSelect, invokeOnly, none. Because we want to handle the selectionchanged event, we set tapBehavior to the value directSelect. selectionMode – This enumeration determines whether you can select multiple items or only a single item. The possible values are none, single, multi. In the code above, this property is set to the value single. layout – You can use ListLayout or GridLayout with a ListView. If you want to display a vertical ListView, then you should select ListLayout. You must associate a ListView with an item template if you want to render anything interesting. The ListView above is associated with an item template named #masterItemTemplate. Here’s the markup for the masterItemTemplate: <div id="masterItemTemplate" data-win-control="WinJS.Binding.Template"> <div class="movie"> <span data-win-bind="innerText:title"></span> </div> </div> This template simply renders the title of each movie. Declaring the Details Template Control The details part of the master/detail view is created with the help of a Template control. Here’s the markup used to declare the Details Template control: <div id="detailsTemplate" data-win-control="WinJS.Binding.Template"> <div> <div> Title: <span data-win-bind="innerText:title"></span> </div> <div> Director: <span data-win-bind="innerText:director"></span> </div> </div> </div> The Details Template control displays the movie title and director.   Handling the selectionchanged Event The ListView control can raise two types of events: the iteminvoked and selectionchanged events. The iteminvoked event is raised when you click on a ListView item. The selectionchanged event is raised when one or more ListView items are selected. When you set the tapBehavior property of the ListView control to the value “directSelect” then tapping or clicking a list item raised both the iteminvoked and selectionchanged event. Tapping a list item causes the item to be selected and the item appears with a checkmark. In our code, we handle the selectionchanged event to update the movie details Template when you select a new movie. Here’s the code from the default.js file used to handle the selectionchanged event: var movieList = document.getElementById("movieList"); var detailsTemplate = document.getElementById("detailsTemplate"); var movieDetails = document.getElementById("movieDetails"); // Setup selectionchanged handler movieList.winControl.addEventListener("selectionchanged", function (evt) { if (movieList.winControl.selection.count() > 0) { movieList.winControl.selection.getItems().then(function (items) { // Clear the template container movieDetails.innerHTML = ""; // Render the template detailsTemplate.winControl.render(items[0].data, movieDetails); }); } }); The code above sets up an event handler (listener) for the selectionchanged event. The event handler first verifies that an item has been selected in the ListView (selection.count() > 0). Next, the details for the movie are rendered using the movie details Template (we created this Template in the previous section). The Complete Code For the sake of completeness, I’ve included the complete code for the master/detail view below. I’ve included both the default.html, default.js, and movies.js files. Here is the final code for the default.html file: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ListViewMasterDetail</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- ListViewMasterDetail references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> <script type="text/javascript" src="js/movies.js"></script> <style type="text/css"> body { font-size: xx-large; } .movie { padding: 5px; } #masterDetail { display: -ms-box; } #movieList { width: 300px; margin: 20px; } #movieDetails { margin: 20px; } </style> </head> <body> <!-- Templates --> <div id="masterItemTemplate" data-win-control="WinJS.Binding.Template"> <div class="movie"> <span data-win-bind="innerText:title"></span> </div> </div> <div id="detailsTemplate" data-win-control="WinJS.Binding.Template"> <div> <div> Title: <span data-win-bind="innerText:title"></span> </div> <div> Director: <span data-win-bind="innerText:director"></span> </div> </div> </div> <!-- Master/Detail --> <div id="masterDetail"> <!-- Master --> <div id="movieList" data-win-control="WinJS.UI.ListView" data-win-options="{ itemDataSource: ListViewDemos.movies.dataSource, itemTemplate: select('#masterItemTemplate'), tapBehavior: 'directSelect', selectionMode: 'single', layout: { type: WinJS.UI.ListLayout } }"> </div> <!-- Detail --> <div id="movieDetails"></div> </div> </body> </html> Here is the default.js file: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { WinJS.UI.processAll(); var movieList = document.getElementById("movieList"); var detailsTemplate = document.getElementById("detailsTemplate"); var movieDetails = document.getElementById("movieDetails"); // Setup selectionchanged handler movieList.winControl.addEventListener("selectionchanged", function (evt) { if (movieList.winControl.selection.count() > 0) { movieList.winControl.selection.getItems().then(function (items) { // Clear the template container movieDetails.innerHTML = ""; // Render the template detailsTemplate.winControl.render(items[0].data, movieDetails); }); } }); } }; app.start(); })();   Here is the movies.js file: (function () { "use strict"; var movies = new WinJS.Binding.List([ { title: "Star Wars", director: "Lucas"}, { title: "Shrek", director: "Adamson" }, { title: "Star Trek", director: "Abrams" }, { title: "Spiderman", director: "Raimi" }, { title: "Memento", director: "Nolan" }, { title: "Minority Report", director: "Spielberg" } ]); // Expose the data source WinJS.Namespace.define("ListViewDemos", { movies: movies }); })();   Summary The purpose of this blog entry was to describe how to create a simple master/detail view by taking advantage of the WinJS ListView control. We handled the selectionchanged event of the ListView control to display movie details when you select a movie in the ListView.

    Read the article

  • Metro: Creating a Master/Detail View with a WinJS ListView Control

    - by Stephen.Walther
    The goal of this blog entry is to explain how you can create a simple master/detail view by using the WinJS ListView and Template controls. In particular, I explain how you can use a ListView control to display a list of movies and how you can use a Template control to display the details of the selected movie. Creating a master/detail view requires completing the following four steps: Create the data source – The data source contains the list of movies. Declare the ListView control – The ListView control displays the entire list of movies. It is the master part of the master/detail view. Declare the Details Template control – The Details Template control displays the details for the selected movie. It is the details part of the master/detail view. Handle the selectionchanged event – You handle the selectionchanged event to display the details for a movie when a new movie is selected. Creating the Data Source There is nothing special about our data source. We initialize a WinJS.Binding.List object to represent a list of movies: (function () { "use strict"; var movies = new WinJS.Binding.List([ { title: "Star Wars", director: "Lucas"}, { title: "Shrek", director: "Adamson" }, { title: "Star Trek", director: "Abrams" }, { title: "Spiderman", director: "Raimi" }, { title: "Memento", director: "Nolan" }, { title: "Minority Report", director: "Spielberg" } ]); // Expose the data source WinJS.Namespace.define("ListViewDemos", { movies: movies }); })(); The data source is exposed to the rest of our application with the name ListViewDemos.movies. Declaring the ListView Control The ListView control is declared with the following markup: <div id="movieList" data-win-control="WinJS.UI.ListView" data-win-options="{ itemDataSource: ListViewDemos.movies.dataSource, itemTemplate: select('#masterItemTemplate'), tapBehavior: 'directSelect', selectionMode: 'single', layout: { type: WinJS.UI.ListLayout } }"> </div> The data-win-options attribute is used to set the following properties of the ListView control: itemDataSource – The ListView is bound to the list of movies which we created in the previous section. Notice that the ListView is bound to ListViewDemos.movies.dataSource and not just ListViewDemos.movies. itemTemplate – The item template contains the template used for rendering each item in the ListView. The markup for this template is included below. tabBehavior – This enumeration determines what happens when you tap or click on an item in the ListView. The possible values are directSelect, toggleSelect, invokeOnly, none. Because we want to handle the selectionchanged event, we set tapBehavior to the value directSelect. selectionMode – This enumeration determines whether you can select multiple items or only a single item. The possible values are none, single, multi. In the code above, this property is set to the value single. layout – You can use ListLayout or GridLayout with a ListView. If you want to display a vertical ListView, then you should select ListLayout. You must associate a ListView with an item template if you want to render anything interesting. The ListView above is associated with an item template named #masterItemTemplate. Here’s the markup for the masterItemTemplate: <div id="masterItemTemplate" data-win-control="WinJS.Binding.Template"> <div class="movie"> <span data-win-bind="innerText:title"></span> </div> </div> This template simply renders the title of each movie. Declaring the Details Template Control The details part of the master/detail view is created with the help of a Template control. Here’s the markup used to declare the Details Template control: <div id="detailsTemplate" data-win-control="WinJS.Binding.Template"> <div> <div> Title: <span data-win-bind="innerText:title"></span> </div> <div> Director: <span data-win-bind="innerText:director"></span> </div> </div> </div> The Details Template control displays the movie title and director.   Handling the selectionchanged Event The ListView control can raise two types of events: the iteminvoked and selectionchanged events. The iteminvoked event is raised when you click on a ListView item. The selectionchanged event is raised when one or more ListView items are selected. When you set the tapBehavior property of the ListView control to the value “directSelect” then tapping or clicking a list item raised both the iteminvoked and selectionchanged event. Tapping a list item causes the item to be selected and the item appears with a checkmark. In our code, we handle the selectionchanged event to update the movie details Template when you select a new movie. Here’s the code from the default.js file used to handle the selectionchanged event: var movieList = document.getElementById("movieList"); var detailsTemplate = document.getElementById("detailsTemplate"); var movieDetails = document.getElementById("movieDetails"); // Setup selectionchanged handler movieList.winControl.addEventListener("selectionchanged", function (evt) { if (movieList.winControl.selection.count() > 0) { movieList.winControl.selection.getItems().then(function (items) { // Clear the template container movieDetails.innerHTML = ""; // Render the template detailsTemplate.winControl.render(items[0].data, movieDetails); }); } }); The code above sets up an event handler (listener) for the selectionchanged event. The event handler first verifies that an item has been selected in the ListView (selection.count() > 0). Next, the details for the movie are rendered using the movie details Template (we created this Template in the previous section). The Complete Code For the sake of completeness, I’ve included the complete code for the master/detail view below. I’ve included both the default.html, default.js, and movies.js files. Here is the final code for the default.html file: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ListViewMasterDetail</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- ListViewMasterDetail references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> <script type="text/javascript" src="js/movies.js"></script> <style type="text/css"> body { font-size: xx-large; } .movie { padding: 5px; } #masterDetail { display: -ms-box; } #movieList { width: 300px; margin: 20px; } #movieDetails { margin: 20px; } </style> </head> <body> <!-- Templates --> <div id="masterItemTemplate" data-win-control="WinJS.Binding.Template"> <div class="movie"> <span data-win-bind="innerText:title"></span> </div> </div> <div id="detailsTemplate" data-win-control="WinJS.Binding.Template"> <div> <div> Title: <span data-win-bind="innerText:title"></span> </div> <div> Director: <span data-win-bind="innerText:director"></span> </div> </div> </div> <!-- Master/Detail --> <div id="masterDetail"> <!-- Master --> <div id="movieList" data-win-control="WinJS.UI.ListView" data-win-options="{ itemDataSource: ListViewDemos.movies.dataSource, itemTemplate: select('#masterItemTemplate'), tapBehavior: 'directSelect', selectionMode: 'single', layout: { type: WinJS.UI.ListLayout } }"> </div> <!-- Detail --> <div id="movieDetails"></div> </div> </body> </html> Here is the default.js file: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { WinJS.UI.processAll(); var movieList = document.getElementById("movieList"); var detailsTemplate = document.getElementById("detailsTemplate"); var movieDetails = document.getElementById("movieDetails"); // Setup selectionchanged handler movieList.winControl.addEventListener("selectionchanged", function (evt) { if (movieList.winControl.selection.count() > 0) { movieList.winControl.selection.getItems().then(function (items) { // Clear the template container movieDetails.innerHTML = ""; // Render the template detailsTemplate.winControl.render(items[0].data, movieDetails); }); } }); } }; app.start(); })();   Here is the movies.js file: (function () { "use strict"; var movies = new WinJS.Binding.List([ { title: "Star Wars", director: "Lucas"}, { title: "Shrek", director: "Adamson" }, { title: "Star Trek", director: "Abrams" }, { title: "Spiderman", director: "Raimi" }, { title: "Memento", director: "Nolan" }, { title: "Minority Report", director: "Spielberg" } ]); // Expose the data source WinJS.Namespace.define("ListViewDemos", { movies: movies }); })();   Summary The purpose of this blog entry was to describe how to create a simple master/detail view by taking advantage of the WinJS ListView control. We handled the selectionchanged event of the ListView control to display movie details when you select a movie in the ListView.

    Read the article

  • Reduce ERP Consolidation Risks with Oracle Master Data Management

    - by Dain C. Hansen
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Calibri","sans-serif"; mso-bidi-font-family:"Times New Roman";} Reducing the Risk of ERP Consolidation starts first and foremost with your Data.This is nothing new; companies with multiple misaligned ERP systems are often putting inordinate risk on their business. It can translate to too much inventory, long lead times, and shipping issues from poorly organized and specified goods. And don’t forget the finance side! When goods are shipped and promises are kept/not kept there’s the issue of accounts. No single chart of counts translates to no accountability. So – I’ve decided. I need to consolidate! Well, you can’t consolidate ERP applications [for that matter any of your applications] without first considering your data. This means looking at how your data is being integrated by these ERP systems, how it is being synchronized, what information is being shared, or not being shared. Most importantly, making sure that the data is mastered. What is the best way to do this? In the recent webcast: Reduce ERP consolidation Risks with Oracle Master Data Management we outlined 3 key guidelines: #1: Consolidate your Product Data#2: Consolidate your Customer, Supplier (Party Data) #3: Consolidate your Financial Data Together these help customers achieve reduced risk, better customer intimacy, reducing inventory levels, elimination of product variations, and finally a single master chart of accounts. In the case of Oracle's customer Zebra Technologies, they were able to consolidate over 140 applications by mastering their data. Ultimately this gave them 60% cost savings for the year on IT spend. Oracle’s Solution for ERP Consolidation: Master Data Management Oracle's enterprise master data management (MDM) can play a big role in ERP consolidation. It includes a set of products that consolidates and maintains complete, accurate, and authoritative master data across the enterprise and distributes this master information to all operational and analytical applications as a shared service. It’s optimized to work with any application source (not just Oracle’s) and can integrate using technology from Oracle Fusion Middleware (i.e. GoldenGate for data synchronization and real-time replication or ODI with its E-LT optimized bulk data and transformation capability). In addition especially for ERP consolidation use cases it’s important to leverage the AIA and SOA capabilities as part of Fusion Middleware to connect these multiple applications together and relay the data into the correct hub. Oracle’s MDM strategy is a unique offering in the industry, one that has common elements across the top and bottom in Middleware, BI/DW, Engineered systems combined with Enterprise Data Quality to enable comprehensive Data Governance at all levels. In addition, Oracle MDM provides the best-in-class capabilities to master all variations of data, including customer, supplier, product, financial data. But ultimately at the center of Oracle MDM is your data, making it more trusted, making it secure and accessible as part of a role-based approach, and getting it to make sense to you in any situation, whether it’s a specific ERP process like we talked about or something that is custom to your organization. To learn more about these techniques in ERP consolidation watch our webcast or goto our Oracle MDM website at www.oracle.com/goto/mdm

    Read the article

  • Pulling changes from master to my work branch?

    - by Utkarsh Sinha
    There's two of us working on something. We're using this branch structure master dev-A dev-B We both work on separate branches (dev-A,B) and whenever we're done - we promote our changes to master. But the drawback of this is we can't get changes the other developer makes. Everything exists in the master tree - but we can't get the latest updates the other developer made. Is there a way to resolve this or should we change our branch structure (per feature?)?

    Read the article

  • Register Your Interest In Taking The Oracle Database 10g Certified Master Exam

    - by Brandye Barrington
    Due to the increasing demand for the Oracle Database 11g Certified Master exams, the 10g version of the exam is being scheduled less frequently worldwide, to reserve space for delivery of the Oracle Database 11g Certified Master Exams. Since we have received several recent requests about the Oracle Database 10g Certified Master Exam, we would like to remind you that if you would like to take this exam, please be sure to register your interest so that Oracle University can gauge interest in this exam in each region. Otherwise, we recommend preparing for the Oracle Database 11g Certified Master Exam. We recognize the effort it takes to reach this level of certification and applaud your commitment!  Register your interest  with Oracle University today so that you can get closer to completing your certification path. 

    Read the article

  • ASP.NET Reports: How To Setup A Master Detail Report

    Check out this How-to Setup An ASP.NET Master-Detail Report video. The screencast shows easy it is to add master-detail information using the ASP.NET XtraReports Suite: The video pace is not too fast and covers what you need to build your first master-detail report. The video also builds on the previous ASP.NET Data-Aware Report. But dont worry, I cover that in the video too. Watch the How-to Setup An ASP.NET Master-Detail Report video and then drop me a line below with your thoughts. Thanks!...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Accessing Master Page Controls

    - by Bunch
    Sometimes when using Master Pages you need to set a property on a control from the content page. An example might be changing a label’s text to reflect some content (e.g. customer name) being viewed or maybe to change the visibility of a control depending on the rights a user may have in the application. There are different ways to do this but this is the one I like. First on the code behind of the Master Page create the property that needs to be accessed. An example would be: Public Property CustomerNameText() As String     Get         Return lblCustomerName.Text     End Get     Set(ByVal value As String)         lblCustomerName.Text = value     End Set End Property Next in the aspx file of the content page add the MasterType directive like: <%@ MasterType VirtualPath="~/MasterPages/Sales.master" %> Then you can access the property in any of the functions of the code behind of the aspx content page. Master.CustomerNameText = “ABC Store” Technorati Tags: ASP.Net,VB.Net

    Read the article

  • MongoDB -what's the safest and most efficient way to change from Master-Slave to ReplicaSet?

    - by SecondThought
    I now have two mongo servers with a Master-Slave configuration (all read-writes are done with the Master, the Slave is just a cold backup) serving a pretty demanding web app. I want to switch to ReplicaSet of 3 servers - I have these 3 already configured and working (still not connected to the web app). Just wondering what's the most efficient way (shortest down-time required, and lossless transfer of all data) to transfer all the data from the master/slave to the RS.

    Read the article

  • Master Page and Jquery Problem?

    - by user356787
    Hi all.. I have a page called AddNews.aspx and in codebehind a web method called AddNews(Parameters).. AddNews.aspx page is inherited from a master page.. So i used contentplaceholder. I have a button..It's id is btnSave. Here is jquery code: $(function() { $("[id$='_btnSave']").click(function() { $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", data: $.toJSON(veriler), url: "AddNews.aspx/AddNews", dataType: "json", success: function(result) { $("#result").html('News added'); } , error: function() { alert('Problem'); } }); }); }); </script> Button click dont trigger.. What can i do? Thanks.

    Read the article

  • Master page managing ContentPlaceHolder

    - by lidermin
    Hi, this is my issue: I have a master page in C#, where I have this code: <div style="width: 30%;height: 500px;float:left"> <asp:ContentPlaceHolder ID="cphMenu" runat="server"> </asp:ContentPlaceHolder> </div> <div style="width: 65%;height: 500px; float:right"> <asp:ContentPlaceHolder ID="cphMain" runat="server"> </asp:ContentPlaceHolder> </div> As you can see, I have two ContentPlaceHolders, the first one is the left menu (cphMenu), and the second one is the page itself. So, I want to click an item from the menu (the menu is a treeview) and load that specific page on the second contentplaceholder (cphMain). How can I get that behaviour?? Thanks in advance.

    Read the article

  • silverlight master-detail with two listboxes in pure xaml with ria services throwing exception

    - by Sam
    Hi, I was trying to achieve master-detail with 2 ListBox, 2 DomainDataSource and a IValueConverter, when entering the page it throws the random error it does when your xaml is invalid: "AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 24 Position: 61]" Which is in fact the start position of where I am binding the listbox selected item with converter to the parameter's value of my DomainDataSource. I would love to achieve this by pure xaml, I did it by code behind and that works but I don't like it :p When the parameter is a hard-coded integer 1, it works, so I assume it's the value binding My code is below here, thanks in advance for at least looking :) (taken into accound all the xmlns's & usings are correct) Xaml: <Grid x:Name="LayoutRoot"> <Grid.Resources> <helpers:ListItemtoIdListValueConverter x:Key="mListConverter" /> </Grid.Resources> <riacontrols:DomainDataSource x:Name="GetLists" DomainContext="{StaticResource DbContext}" LoadSize="20" QueryName="GetLists" AutoLoad="True" /> <riacontrols:DomainDataSource x:Name="GetListItems" DomainContext="{StaticResource DbContext}" LoadSize="20" QueryName="GetListItemsById" AutoLoad="True"> <riacontrols:DomainDataSource.QueryParameters> <riadata:Parameter ParameterName="id" Value="{Binding ElementName=ListBoxLists, Path=SelectedItem, Converter={StaticResource mListConverter}}" /> </riacontrols:DomainDataSource.QueryParameters> </riacontrols:DomainDataSource> <activity:Activity IsActive="{Binding IsBusy, ElementName=ListBoxListItems}"> <StackPanel Orientation="Horizontal"> <ListBox x:Name="ListBoxLists" ItemsSource="{Binding Data, ElementName=GetLists, Mode=OneWay}" Width="150" Margin="0,0,10,10" /> <ListBox x:Name="ListBoxListItems" ItemsSource="{Binding Data, ElementName=GetListItems, Mode=OneWay}" Width="150" Margin="0,0,10,10" /> </StackPanel> </activity:Activity> </Grid> IValueConverter: public class ListItemtoIdListValueConverter: IValueConverter { #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { list mList = (list)value; if (mList != null) return mList.id; else return null; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } #endregion }

    Read the article

  • ResolveUrl Problem in Master Page

    - by Tarik
    Okay, I know it is weird but when I put this code between <head runat="server"></head> in master.page, this is how it renders into: <link id="ctl00_Link1" rel="shortcut icon" href="../%3C%25%20ResolveUrl(%22~/Resources/Pictures/Shared/Misc/favicon.ico%22);%20%25%3E" type="image/x-icon" /> It doesn't see something asp.net needs to take care of. This is the original code : <link id="Link1" rel="shortcut icon" href='<%=ResolveUrl("~/Resources/Pictures/Shared/Misc/favicon.ico") %>' type="image/x-icon" runat="server" /> Basically Asp.Net doesn't take care of the code below and renders as a normal html. How can I get over this problem? Thanks in advance... Edit and Resolved Okay people, there is no way for doing this. I've finally figured out because ResolveUrl or ResolveClientUrl is only working for these below : @import '<%= ResolveUrl("~/Resources/Styles/MainMaster/MainDesign.css") %>'; <script src='Resources/Scripts/Libraries/jquery-1.4.2.js' type="text/javascript"</script> it is too literal for link so you need to put link elements in body tag like : <body> <link id="iconOne" rel="shortcut icon" type="image/x-icon" href="Resources/Pictures/Shared/Misc/favicon.ico"/> <link id="iconTwo" rel="icon" href='Resources/Pictures/Shared/Misc/favicon.ico' type="image/ico" /> </body>

    Read the article

  • JQGRID Master detail on different pages

    - by dennisg
    Hello, I need some help on next things. I was trying to do next few things. I have one grid_test.php (that creates jqgrid) and index_grid.php (just to display grid.php). jQGrid in grid.php have custom button named 'Prikazi'. I want the user to select one row from that grid and when press custom button 'Prikazi' to redirect to another page to show subgrid (and to pass parameter which is the id of the selected row). Subgrid is in the file detail_test.php and also I have file called index_detail.php (for displaying the file detail_test.php with jqgrid). These php files communicate by passing parameter id_reda (or id) that is id of the selected row in grid_test.php. I have tried many ways to achieve that but I wasn't able. Subgrid php file (detail_test.php) receives that parameter but when I add that to sql statement in subgrid file it shows next error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 0' at line 16' in C:\Zend\Apache2\htdocs\jqSuitePHP3811SourceRadna\php\jqGridPdo.php:62 I really don't know what am I doing wrong. Maybe the passing of parameter is wrong and maybe subgrid can't create colModel properly. Or it has something to do with sql statements. Actually my work was based on one of your examples masterdetail, but I wanted to have master grid on one page and when user clicks custom button, goes to another page with detail grid. You can see my example on next page: http://pljevlja.org/grid/index_test.php. And all my php files are here: -http://pljevlja.org/grid/TXT.zip<- Thanks in advance,

    Read the article

  • Validation of viewstate MAC failed with nested master page

    - by just_name
    After I use a nested master page ,I face the following problem : Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. and sometimes Invalid related information [ViewStateException: Invalid viewstate. Client IP: 127.0.0.1 Port: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 ViewState: /wEPDwULLTEzOTY5MjA1ODUPZBYCZg9kFgICAw9kFg4CAQ9kFgJmDxYCHgRocmVmBUZmcm1faXRlbXMyLmFzcHg/c3lzPURGJmdycD0xJmRiPTUmZW1wPTc1NCZmaXJzdFJlcXVlc3Q9dHJ1ZSZMaXN0VHlwZT0xFgICAQ8PFgIeBFRleHQFATFkZAIDDxYCHgVjbGFzcwUGYWN0aXZlFgJmDxYCHwAFRmZybV9pdGVtczIuYXNweD9zeXM9REYmZ3JwPTEmZGI9NSZlbXA9NzU0JmZpcnN0UmVxdWVzdD10cnVlJkxpc3RUeXBlPTIWAgIBDw8WAh8BBQI3OGRkAgUPZBYCZg8WAh8ABUZmcm1faXRlbXMyLmFzcHg/c3lzPURGJmdycD0xJmRiPTUmZW1wPTc1NCZmaXJzdFJlcXVlc3Q9dHJ1ZSZMaXN0VHlwZT0zFgICAQ8PFgIfAQUDODY0ZGQCBw9kFgJmDxYCHwAFRmZybV9pdGVtczIuYXNweD9zeXM9REYmZ3JwPTEmZGI9NSZlbXA9NzU0JmZpcnN0UmVxdWVzdD10cnVlJkxpc3RUeXBlPTQWAgIBDw8WAh8BBQEwZGQCCQ9kFgJmDxYCHwAFP2ZybV9Vc2VyVGFza3MyLmFzcHg/c3lzPURGJmdycD0xJmRiPTUmZW1wPTc1NCZmaXJzdFJlcXVlc3Q9dHJ1ZWQCCw9kFgJmDxYCHwAFN1NlYXJjaC5hc3B4P3N5cz1ERiZncnA9MSZkYj01JmVtcD03NTQmZmlyc3RSZXF1ZXN0PXRydWVkAg8PZBYMAgQPEA8WBh4ORGF0YVZhbHVlRmllbGQFCFRhc2tDb2RlHg1EYXRhVGV4dEZpZWxkBQhUYXNrTmFt...] [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116 System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +13 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +220 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +5 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37 System.Web.UI.HiddenFieldPageStatePersister.Load() +202 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +106 System.Web.UI.Page.LoadAllState() +43 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3905 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +262 System.Web.UI.Page.ProcessRequest() +79 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +109 ASP.frm_items2_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a961040e\19f53d4c\App_Web_frm_items2.aspx.cdcab7d2.nkfrbsfi.0.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76 I use this Tool to fix this problem but in vain !! I don't know even the root cause of this problem !!

    Read the article

  • Custom Detail in Linq-to-SQL Master-Detail DataGridViews

    - by Andres
    Hi, looking for a way to create Linq-to-SQL Master-Detail WinForms DataGridViews where the Detail part of the Linq query is a custom one. Can do fine this: DataClasses1DataContext db = new DataClasses1DataContext(".\\SQLExpress"); var myQuery = from o in db.Orders select o; dataGridView1.DataSource = new BindingSource() { DataSource = myQuery }; dataGridView2.DataSource = new BindingSource() { DataSource = dataGridView1.DataSource, DataMember = "OrderDetails" }; but I'd like to have the Detail part under my precise control, like var myQuery = from o in db.Orders join od in db.OrderDetails on o.ID equals od.OrderID into MyOwnSubQuery select o; and use it for the second grid: dataGridView2.DataSource = new BindingSource() { DataSource = dataGridView1.DataSource, DataMember = "MyOwnSubQuery" // not working... }; the real reason I want it is a bit more complex (I'd like to have the Detail part to be some not-pre-defined join actually), but I'm hoping the above conveyed the idea. Can I only have the Detail part as a plain sub-table coming out of the pre-defined relation or can I do more complex stuff with the Detail part? Does anyone else feel this is kind of limited (if the first example is the best we can do)? Thanks!

    Read the article

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