Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - previous master page question

 
Thread Tools Search this Thread
Old 04-22-2008, 01:19 PM   #1
Default previous master page question



I'm using the master page for a single post back operation to another page
and i'm having trouble finding how to get a previous master page textbox.
Note: both pages use the same masterpage.
this is what iv'e tried so far but this does not fire.
protected void Page_Load(object sender, EventArgs e)
{
if (PreviousPage != null)
{
tbTrepID.Text =
((TextBox)PreviousPage.NamingContainer.FindControl ("tbTrepID")).Text;
}
}
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes


WebBuilder451
  Reply With Quote
Old 04-22-2008, 01:38 PM   #2
WebBuilder451
 
Posts: n/a
Default RE: previous master page question
got it. Thanks
if (PreviousPage != null)
{
tbTrepID.Text =
((TextBox)PreviousPage.Master.FindControl("tbTrepI D")).Text;

}

--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes


"WebBuilder451" wrote:

>
> I'm using the master page for a single post back operation to another page
> and i'm having trouble finding how to get a previous master page textbox.
> Note: both pages use the same masterpage.
> this is what iv'e tried so far but this does not fire.
> protected void Page_Load(object sender, EventArgs e)
> {
> if (PreviousPage != null)
> {
> tbTrepID.Text =
> ((TextBox)PreviousPage.NamingContainer.FindControl ("tbTrepID")).Text;
> }
> }
> --
> (i''ll be asking a lot of these, but I find C# totally way cooler than vb
> and there''s no go''n back!!!)
> thanks (as always)
>
> kes



WebBuilder451
  Reply With Quote
Old 04-22-2008, 01:44 PM   #3
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a
Default Re: previous master page question
"WebBuilder451" <> wrote in message
news:B3508ADA-2D1B-47A2-9703-...
>
> I'm using the master page for a single post back operation to another page
> and i'm having trouble finding how to get a previous master page textbox.
> Note: both pages use the same masterpage.
> this is what iv'e tried so far but this does not fire.
> protected void Page_Load(object sender, EventArgs e)
> {
> if (PreviousPage != null)
> {
> tbTrepID.Text =
> ((TextBox)PreviousPage.NamingContainer.FindControl ("tbTrepID")).Text;
> }
> }
> --


I am not sure of the precise method to do this. Perhaps

PreviousPage.Master.FindControl("textBoxName")

You may have to bubble the information down to the actual page before
submit, as I am not sure what information is sent to the next page.

> (i''ll be asking a lot of these, but I find C# totally way cooler than vb
> and there''s no go''n back!!!)
> thanks (as always)


C# is more concise, which is what I like most about it, although the IDE
does finish things for you in VB.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************




Cowboy \(Gregory A. Beamer\)
  Reply With Quote
Old 04-22-2008, 01:56 PM   #4
WebBuilder451
 
Posts: n/a
Default Re: previous master page question
thank you. That's what i did. Your answer is appreciated!!!
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)

kes


"Cowboy (Gregory A. Beamer)" wrote:

> "WebBuilder451" <> wrote in message
> news:B3508ADA-2D1B-47A2-9703-...
> >
> > I'm using the master page for a single post back operation to another page
> > and i'm having trouble finding how to get a previous master page textbox.
> > Note: both pages use the same masterpage.
> > this is what iv'e tried so far but this does not fire.
> > protected void Page_Load(object sender, EventArgs e)
> > {
> > if (PreviousPage != null)
> > {
> > tbTrepID.Text =
> > ((TextBox)PreviousPage.NamingContainer.FindControl ("tbTrepID")).Text;
> > }
> > }
> > --

>
> I am not sure of the precise method to do this. Perhaps
>
> PreviousPage.Master.FindControl("textBoxName")
>
> You may have to bubble the information down to the actual page before
> submit, as I am not sure what information is sent to the next page.
>
> > (i''ll be asking a lot of these, but I find C# totally way cooler than vb
> > and there''s no go''n back!!!)
> > thanks (as always)

>
> C# is more concise, which is what I like most about it, although the IDE
> does finish things for you in VB.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://gregorybeamer.spaces.live.com/lists/feed.rss
>
> or just read it:
> http://gregorybeamer.spaces.live.com/
>
> *************************************************
> | Think outside the box!
> |
> *************************************************
>
>
>



WebBuilder451
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital Album Master - Make High Resolution Slideshow For TV jerryliang Software 0 07-17-2009 03:16 AM
Certified Master question jim MCITP 2 08-28-2008 02:47 AM
Classic Original Broadcasts Trading List - Updated ( w/o/c ) porkys1982@sbcglobal.net DVD Video 0 12-05-2005 03:38 AM
Classic Original Broadcasts Trading List - Updated ( w/o/c ) porkys1982@sbcglobal.net DVD Video 0 11-19-2005 04:46 PM
Original Airings : The A-Team , M*A*S*H , Taxi , Barney Miller , WKRP porkys1982@sbcglobal.net DVD Video 0 08-15-2005 03:09 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46