Want o Access Content page Control in Master Page how come posible

Posted by Navalemanoj0405 under Regular Expressions on 5/6/2011 | Points: 10 | Views : 2185 | Status : [Member] | Replies : 4
Dear All

Want o Access Content page Control in Master Page. how come posible?

please Revert




Responses

Posted by: Prabhakar on: 5/6/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Navalemanoj0405


Clear it ur Requirement . . u have content page with mater page . . . u want to write some code in master page or else .

Say ur Full Requirement . .

Best Regard's
Prabhakar

Navalemanoj0405, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Navalemanoj0405 on: 5/6/2011 [Member] Starter | Points: 25

Up
0
Down
thank for reply Mr. Prabhakar

I have a page which is associate with master page.
Now there is a textbox control on Content page want to access it in master page.

how it is possible?
thanks

Navalemanoj0405, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 5/6/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Why u use Content Textbox Control in MAstre Page . . Show ur condition . . u want to Store user id else some thing . .


if u create cookies in ur content page so u use it in Master page . .

like this

lblusers.Text = HttpContext.Current.Request.Cookies["username"].Value.ToString();

Show what's ur Code Requirement . .

Best Regard's
Prabhakar

Navalemanoj0405, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bugwee on: 5/6/2011 [Member] Starter | Points: 25

Up
0
Down
hi Navalemanoj0405,

You can do something like this.
Let us say that you have two link button in your "masterpage.master" and you want to control the textbox of your content page like you want to set it to enable or disable.
So in your master page,
<asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/contentpage.aspx?action=Enable">Enable Textbox</asp:LinkButton>

<asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl="~/contentpage.aspx?action=Disable">Disable Textbox</asp:LinkButton>

in your contentpage.aspx
<asp:TextBox ID="txtToControl" runat="server"></asp:TextBox>

and in your contentpage.aspx.vb page load event put this
If Page.Request.QueryString("action") = "Enable" Then

txtToControl.Enabled = True
ElseIf Page.Request.QueryString("action") = "Disable" Then
txtToControl.Enabled = False
End If

You can now control the textbox in your content page true the link button of your masterpage.

Hope this helps.



Navalemanoj0405, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response