previous master page question
previous master page question
am 22.04.2008 14:19:00 von WebBuilder451
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
RE: previous master page question
am 22.04.2008 14:38:01 von WebBuilder451
got it. Thanks
if (PreviousPage != null)
{
tbTrepID.Text =
((TextBox)PreviousPage.Master.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" 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
Re: previous master page question
am 22.04.2008 14:44:09 von NoSpamMgbworld
"WebBuilder451" wrote in message
news:B3508ADA-2D1B-47A2-9703-39E7E68B49AC@microsoft.com...
>
> 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!
|
*************************************************
Re: previous master page question
am 22.04.2008 14:56:02 von WebBuilder451
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-39E7E68B49AC@microsoft.com...
> >
> > 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!
> |
> *************************************************
>
>
>