.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

passing page title through a param

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net

Hello all,

   I am new to ASP.NET, and was wondering how to pass a Page title through a parameter.  In classic ASP I could just use something like: <title><%=Pagetitle%></title> but I cannot seem to get this to work in ASP.NET. 

Thank you in advance,

The New Guy... Smile 

View Complete Post

More Related Resource Links

Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Page Title from Resource file...



I have Resource file...

I am using following code for Display Lable Text...

<asp:Label ID="lblName" runat="server" Text="<%$ Resources:resource,NAME %>"></asp:Label>

and I want to use that name for page title...

so I used "me.page.resources.resource.NAME" in code behind page.

 but I want to use that NAME in

<%@ Page Language="VB"

Master Page And Title Tag


Hello everybody.

I am new in ASP.NET. Right now I am practising MasterPage and association of other pages with it. These is so far I have :

MasterPage :

<%@ Master Language = "C#" AutoEventWireup = "true" CodeFile = "MasterPage.master.cs" Inherits = "MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns = "http://www.w3.org/1999/xhtml">
<head runat = "server">
<title visible = "false" runat = "server"></title>
<asp:ContentPlaceHolder id = "Head" runat = "server">
<link href = "StyleSheet.css" rel = "Stylesheet" type = "text/css" />

<form id = "form1" runat = "server">
<div id = "header">
<li><a href = "Default.aspx">Default</a></li>
<li><a href = "MembersProfile.aspx">Profile</a></li>

<div id = "m

I need help with the syntax for passing a record field value from SSRS to an asp page

I have tried several variations without success.  Here is where I am now.  The goal is from inside Report Manager report, link to an asp page with a filed value. This is from the expression line of the Jump to URL entry. Also I am trying to open a new page http://www.whereever.com/CSSurvey01.asp?RecordID=" & Fields!respid.Value            

Passing values from web page to custom security trimmer in SharePoint 2010

Hi, In SharePoint 2007 we had a custom security trimmer that implemented ISecurityTrimmer interface. We also had a custom webpart used for search. Now, using HttpContext we passed values from the webpart to security trimmer with additional info needed to trim the results. It worked since trimmer was executed in the same w3wp process as webpart. Now in SharePoint 2010, the architecture for ISecurityTrimmer2 has changed, as it's executed in search process (other w3wp) - not the webpart w3wp so it has no access to the HttpContext. Question is: how to pass custom data, in form of the string, to a security trimmer when search is done from custom code in webart?

Passing parameters from ASP.Net web page to SSRS report

I have a web page that displays some data.  The user first selects a date range on the web page and then can edit some data.  When they click a submit button, I want to run a report.  But I would like to pass the start date and end date values that the user already entered on the web page to the report.  Is this possible?  Can I use the value of a session variable in the report? Bob

Response.Redirect in C# for page to page parameter passing

Looking for examples of this, but can't find anything specific. I'm new to ASP.NET, and C# at the same time... so I'm struggling to get it right...  Thanks, Nick

Problems passing parameters to SSRS report from ASP.Net web page

I have a web page that displays some data.   When they click a submit button, I want to run a report.  But I would like to pass the start year/month and end year/month values that the user already entered on the web page to the report.  Here is what my url looks like when the report is displayed: http://xyzserver/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fDevicesAllNew&rs:Command=Render&StartYYMM=201007&EndYYMM=201008 But my report displays the 2 textboxes for my StartYYMM and EndYYMM parameters as empty.  What am I doing wrong?  I did a google search and I saw something about using ReportServer instead of ReportManager.  I notice at the top of the browser when I run my report, it reads "Report Manager - Windows Internet Explorer".  Is this correct? Bob     Bob

Edit List Title on a Mobile Page

hello, i want to know if i can edit the title which the item is displayed on a mobile page e.g "New Task for Job No 2", can i edit the way its displayed? e.g can i add to it the start/end date also ? e.g "New Task for Job No 2 StartDate:current EndDate:current". thanks

Session or Request in class without passing as param

I'd like to be able to reference the asp.net objects Session, Request, from a procedure without passing them in as parameters all the time. Is there a way to do this. For example, now I have namespace xx { public class ContextPT { public static string GetSession(System.Web.SessionState.HttpSessionState inSession) { StringBuilder sb = new StringBuilder(1000); string nameType; string value; foreach (string s in inSession.Keys) { nameType = s + " " + inSession[s].GetType().ToString(); value = inSession[s].ToString(); sb.AppendLine(nameType + ": " + value); // dataRow(new string[] {nameType, value}); } return sb.ToString(); } } } somewhere else this.lContext.Text = ContextPT.GetSession(Session); I'd like to call it like this "ContextPT.GetSession()" and have GetSession know how to find the Session object.  I know this does not seem like a big deal in this case, but I have reasons. 

Problem passing a text box value from aspx.cs page to SelectParameters in aspx page

Hi,I would like to take a value from a text box and pass it as a search parameter to my database. I get the value from my code behind page as follows: protected void btn_click(Object sender, ImageClickEventArgs e)      {           AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;           string test = AccessDataSource1.SelectParameters["inputValue"].DefaultValue;                      //string inputValue = TextBox1.Text;          //Response.Write(inputValue);         // AccessDataSource1.SelectParameters.Add("@name", inputValue);          //Response.Write(@inputValue);                              } protected void btn_click(Object sender, ImageClickEventArgs e)     {          AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;          //An alternate option I have used is          //string inputValue = TextBox1.Text;         // AccessDataSource1.Selec

Float the Page Title Zone when scrolling down the page?

I would like the horizontal nav and everything above it to float (stay in view) as a user scrolls down the page, like the Ribbon (SharePoint:SPRibbon) does. Basically, this tag <div id="s4-workspace">     /bac

Approval workflow is not passing task instructions to workflow task page (WrkTaskIP.aspx)

Hi, Very weird issue. Never happened before. I have Document Approval workflow, based on built-in approval workflow, which is available in document libraries of every site in the site collection. You might know that when you kick off approval (even collect feedback) workflow, you can enter task instructions, which will be passed on to the workflow task page (WrkTaskIP.aspx), and also included in the email, which will be sent to approvers (reviewers in case it is a collect feedback workflow). I know that the users used to enter task instructions, and before, it was appearing in the workflow task page where you approve/reject it. Recently, they noticed that the task instructions textbox was being empty, though the instructions were being entered when the workflow was started. Moreover, it stopped showing task instructions for other tasks that existed for a long time. BTW, this is not the same in every environment we have, but I could not find any difference in the settings when I compared them. Has anybody faced this problem? Please help if you know the solution. Thank you!!! Regards, R.D.M.

Add a title to a new webpart page

Hi - I've created a publishing site in sharepoint and now I want to create a page which with a webpart - the problem is that unlike all the other pages - there is no "Title" displayed. There is no way to add a title above with all the blank space. I'd rather not use the content editor to add a title - since the look of this page will change from the other pages.Has anyone tried to add a title in that "blank" space before all the webparts begin?ThanksDR

How to link Title to it's associated page in list view without URL path column visible -bug?

I don't know if this is a bug or if I'm an idiot (or perhaps both, I'm open minded).   My site I'm developing is a site with publishing features activated where all my news stories are pages. What I want to have is a sortable list (the type hypothetically achieved using the XsltListView Web Part) the lists these pages with 3 columns visible: The Date created, the title (not the page name), and the author. The tricky part is that I would like the title, when clicked on, to take the person to the page. I'm actually almost there. I've created a new view with these specifications except for one issue. To make the title linked to the page, I have to have the column "URL Path" in my list view. When I remove this column, the titles instead all link to the root of the directory I'm in (ex: if I'm in Pages/Forms/My_List.aspx it will link to Pages/Forms/) Is this a bug, or is the URL Path required for the link to work? Is there a way to hide the column? Thanks.

Update Title on Content Page(MOSS 2007)

I have multipal websites. I would like to update "Title" field in the content pages. How Can I do it using wsp/c#. For example.. I have site like http://www.something.com/pages/home.aspx . I this page I have "Title" field with value like "Something" now I want to change that to "Something else". Please help.    

Edit item title in a list on a mobile page

hello, can i edit an item title for a list on a mobile page in MOSS 2010 ? e.g i want my list items to appear as "New task StartDate:current EndDate:current" that includes three things the list title,startdate and enddate for the item. thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend