[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

05/21/2008 at 08:58AM PDT, ID: 23421409
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Script for changing the title of a web page dynamically

Asked by dsmarket in Programming for ASP.NET, Microsoft Visual C#.Net

Tags: c#, asp.net

We have a web site built in C# / ASP.NET
Currently we have one title that applies for all pages so if you navigate to each of the pages of  
 http://www.m-photo.com  you can verify that the title remains the same.
We want a script that will change the title dynamically so if for example I navigate to : http://www.m-photo.com/products/backend/
And I press on each of the products located in the left menu I will get a page with a different title according to the ID
For example
http://www.m-photo.com/products/backend/default.aspx?ProdID=9   (title 1)
http://www.m-photo.com/products/backend/default.aspx?ProdID=10 (title 2)
Etc&

This is the code of our Portal. Master page (the main template)

<%@ Master Language="C#" AutoEventWireup="true" %>
<%@ Import namespace="System" %>
<%@ Import namespace="System.Text" %>
<%@ Import namespace="System.Configuration" %>
<%@ Import namespace="System.Collections.Generic" %>
<%@ Import namespace="System.Web" %>
<%@ Import namespace="System.Web.Security" %>
<%@ Import namespace="System.Web.UI" %>
<%@ Import namespace="System.Web.UI.WebControls" %>
<%@ Import namespace="System.Web.UI.WebControls.WebParts" %>
<%@ Import namespace="System.Web.UI.HtmlControls" %>
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<%@ Register src="~/App_Controls/support.ascx" tagname="support" tagprefix="uc1" %>
<%@ Register src="~/App_Controls/TopMenu.ascx" tagname="TopMenu" tagprefix="uc2" %>
<%@ Register src="~/App_Controls/News.ascx" tagname="News" tagprefix="uc3" %>
<%@ Register src="~/App_Controls/footer.ascx" tagname="footer" tagprefix="uc4" %>
<%@ Register src="~/App_Controls/copyright.ascx" tagname="copyright" tagprefix="uc5" %>
<script runat="server">
    //Constants defining title for "unnamed" page and
    const string DEFAULT_UNNAMED_PAGE_TITLE = "Untitled Page";
    const string DEFAULT_PAGE_TITLE = "M-Photo Ltd. - Color correction tools for professional photolabs";

    protected void Page_Load(object sender, System.EventArgs e)
    {
        //Set the page's title, if needed
        if (string.IsNullOrEmpty(Page.Title) || Page.Title == DEFAULT_UNNAMED_PAGE_TITLE)
        {
     
                Page.Title = DEFAULT_PAGE_TITLE;
        }
    }



   
</script>

This is the code of one of the default.aspx (in this case it is the http://www.m-photo.com/products/backend/)


<%@ Page Language="C#" MasterPageFile="~/App_Masters/Portal.Master" AutoEventWireup="true" Theme="Standard"  Buffer="true" %>
<%@ Register Src="~/App_Controls/front.ascx" TagName="front" TagPrefix="uc1" %>
<asp:Content ID="Content1" runat="server" contentplaceholderid="midPan">
<asp:Repeater id="Repeater1" runat="server" DataSourceID="dsGeneral">
                             <ItemTemplate>                                
                             <h2><%# DataBinder.Eval(Container.DataItem, "title")%></h2>
                              <%# DataBinder.Eval(Container.DataItem, "full_text")%>
                             </ItemTemplate>
                         </asp:Repeater><asp:SqlDataSource id="dsGeneral" runat="server" ConnectionString="<%$ ConnectionStrings:portalDSN %>" SelectCommand="sp_get_ProductsByID" SelectCommandType="StoredProcedure">
<SelectParameters>
    <asp:QueryStringParameter Name="ProdID" QueryStringField="ProdID"
        Type="Int32" DefaultValue="1" />
    <asp:Parameter DefaultValue="2" Name="ProdCatID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>          
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="leftPan">
    <uc1:front ID="front1" runat="server" />
</asp:Content>
[+][-]05/21/08 09:17 AM, ID: 21616572

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/21/08 11:35 AM, ID: 21617719

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/21/08 11:47 AM, ID: 21617837

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/21/08 11:35 PM, ID: 21621410

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/22/08 12:24 AM, ID: 21621557

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/22/08 12:54 AM, ID: 21621664

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/22/08 01:15 AM, ID: 21621754

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/22/08 01:48 AM, ID: 21621854

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/22/08 02:21 AM, ID: 21622020

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/25/08 06:56 AM, ID: 21642728

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/25/08 03:00 PM, ID: 21643764

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/25/08 11:47 PM, ID: 21644988

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/26/08 02:04 AM, ID: 21645400

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/26/08 11:23 PM, ID: 21649718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/27/08 01:44 AM, ID: 21650310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/27/08 02:37 AM, ID: 21650513

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/27/08 11:00 PM, ID: 21658002

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/28/08 02:51 AM, ID: 21658932

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/28/08 06:59 AM, ID: 21660438

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/28/08 04:17 PM, ID: 21665093

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/29/08 12:33 AM, ID: 21667006

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/29/08 01:03 AM, ID: 21667156

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/29/08 03:45 AM, ID: 21667780

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/29/08 10:44 AM, ID: 21671486

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/29/08 10:45 AM, ID: 21671492

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/01/08 01:57 AM, ID: 21686414

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/01/08 03:05 AM, ID: 21686486

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Microsoft Visual C#.Net
Tags: c#, asp.net
Sign Up Now!
Solution Provided By: dweppenaar
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 / EE_QW_2_20070628