content-pages

Calling Content Page Method from MasterPage Method [duplicate]

非 Y 不嫁゛ 提交于 2019-11-28 06:55:51
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: content page class method calling from master page class I need to access Content Page Method from Master page Event. How can I do this? Content Page: public partial class Call_Center_Main : System.Web.UI.Page { Page_Load(object sender, EventArgs e) { } public void MenuClick(string ClkMenu) { // Some Code } } MasterPage: public partial class MasterPage : System.Web.UI.MasterPage { protected void Page_Load(object

How to add meta tag to ASP.Net content page

给你一囗甜甜゛ 提交于 2019-11-28 05:00:26
I have several content pages hanging off of one master page. I need to add a refresh meta tag to one of the content pages but I can't see where I can do this. Any help would be much appreciated. Have not tried this with refresh, but in general you can add a meta tag like this: var keywords = new HtmlMeta { Name = "keywords", Content = "one,two,three" }; Header.Controls.Add(keywords); update : it is possible this way. Check Rick Strahl http://www.west-wind.com/weblog/posts/2006/Aug/04/No-more-Meta-Refresh-Tags DOK This page explains the new feature: ASP.Net 4 adds 2 new Meta tag related

How to call javascript function from asp.net button click event

风流意气都作罢 提交于 2019-11-28 01:26:50
问题 How do I call the showDialog from a asp.net button click event. My page is a contentpage that has a masterpage associated with it. I have tried the following <asp:Button ID="ButtonAdd" runat="server" Text="Add" OnClientClick="showDialog('#addPerson');" /> <asp:Button ID="ButtonAdd" runat="server" Text="Add" OnClientClick="showDialog(#<%=addPerson.ClientID %>);" /> I am also going to have to call this same function from a gridview template button to modify the record on the dialog. <script

why we use @Master type?

扶醉桌前 提交于 2019-11-27 17:35:55
问题 if we have a master page and a content page.so the content page @Page directive look like as <%@ Page Language="C#" MasterPageFile="~/Site1.Master" .... /> so , in order to access master page controls in content page we should have to use <%@ MasterType VirtualPath="~/Site1.Master" %> so , my question is this why we use @MasterType directive when we already define in the @page directive that this content page is in the master page (here -- Site1.Master) 回答1: From Microsoft Docs you are

How to add meta tag to ASP.Net content page

喜夏-厌秋 提交于 2019-11-27 00:44:31
问题 I have several content pages hanging off of one master page. I need to add a refresh meta tag to one of the content pages but I can't see where I can do this. Any help would be much appreciated. 回答1: Have not tried this with refresh, but in general you can add a meta tag like this: var keywords = new HtmlMeta { Name = "keywords", Content = "one,two,three" }; Header.Controls.Add(keywords); update : it is possible this way. Check Rick Strahl http://www.west-wind.com/weblog/posts/2006/Aug/04/No