CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/13/2007 12:30:03 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 28 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
shahab_ksh
Asp.Net User
Master Page And Textbox12/13/2007 12:30:03 PM

0/0

I have This Code on the Master Page

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" 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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
       
        <br />
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        </asp:contentplaceholder>
    </div>
    </form>
</body>
</html>

i use this MasterPage for two page

When i set TextBox1 on page 1

and goto page 2 TextBox1 has empty !? Why ? and how i can solve this problem 

 

ziqbalbh
Asp.Net User
Re: Master Page And Textbox12/13/2007 1:02:53 PM

0/0

Hi,

What you are doing is not a master page concept. You are thinking that when i set some value of a control which is placed in a master page, it will act like a shared item. While its not the case. Master page is a simple a common supplier of layout. While controls viewstate is per page, not per master page. 


Zafar Iqbal
VP Technology
Hansvits


** Please mark as ANSWER if my reply helped you
shahab_ksh
Asp.Net User
Re: Master Page And Textbox12/13/2007 5:14:59 PM

0/0

how i can slove this problem?

suresh_g_v2002
Asp.Net User
Re: Master Page And Textbox12/13/2007 5:30:20 PM

0/0

hi shahab_ksh,

if you want page1 textbox1 value in page2

you can try in the following way ,

PreviousPage.Master.FindControl("TextBox1").Value

and so on......

 

 

Hope this helps

Regards

Suresh Kumar Goudampally 

 

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Special Edition Using Microsoft Office 2003 Authors: Ed Bott, Woody Leonhard, Pages: 1368, Published: 2004
QuarkXPress 7 for Windows and Macintosh: Visual QuickStart Guide Authors: Elaine Weinmann, Peter Lourekas, Pages: 464, Published: 2006
QuarkXPress 5 for Macintosh and Windows: Visual QuickStart Guide Authors: Elaine Weinmann, Peter Lourekas, Pages: 498, Published: 2002
Microsoft Publisher 2007 for Dummies Authors: Jim McCarter, Jacqui Salerno Mabin, Pages: 366, Published: 2007
Real World Quarkxpress 5: For Macintosh and Windows Authors: David Blatner, Pages: 1032, Published: 2002
Using QuarkXPress 5 Authors: Suzanne Sayegh Thomas, Pages: 505, Published: 2002
Microsoft Office 2003 All-in-one: All-in-one Authors: Joseph W. Habraken, Pages: 951, Published: 2004
The QuarkXPress Book Authors: David Blatner, Keith Stimely, Stephen F. Roth, Pages: 593, Published: 1991
Quarkxpress 3.3 for Macintosh: Visual QuickStart Guide Authors: Elaine Weinmann, Pages: 248, Published: 1994
QuarkXPress 6 for Macintosh and Windows: Visual QuickStart Guide Authors: Elaine Weinmann, Peter Lourekas, Pages: 16, Published: 2003

Web:
How to: Reference ASP.NET Master Page Content The following code example shows how to use the FindControl method to get a reference to two controls on the master page, a TextBox control and a Label ...
SetFocus to a Textbox on PageLoad with MasterPage, TabPanel ... The page is based off of a master page. The textbox is inside an user control which is inside a TabPanel. The User Control is encapsulated with a AJAX ...
MS Publisher Master Page - cannot edit contents of text box iwhich ... Hello experts I'd like to create business cards in MS Publisher. To do so, I've created a master page and inserted a number of text boxes where the data of ...
ASP.NET 2.0 findcontrol textbox inside a panel on masterpage Mar 29, 2007 ... I have a textbox inside a panel on a masterpage. I wrote this function to clear a form, however if a control is inside a panel it can't be ...
ASP.NET - Master Page Drawbacks Here's some code that shows how to change the value of a TextBox on a master page in a content page. // How content page can change TextBox. ...
An important issue while using Master page: ID changed of the ... Now add a new web page (Deafault.aspx) to your site and select Site.master as it ’s master page. Put a textbox and a button. Change their IDs to txtName and ...
How to hide a textbox from master page in content page Hi, I have a search textbox in master page, i need to show or hide it on button click in ....
Less Than Dot - Wiki - ASP.NET: Access Master Page controls from ... Load; ' Set the value of the Master Page's Label to the Content Page's TextBox; txtTest.Text = CType(Page.Master, site).MyText; ' Update the Master Page's ...
CodeGuru Forums - Problem accessing textbox in master page from ... I have a textbox and button on my master page. ... Load Dim mp As MasterPage Dim tb As TextBox Dim search As String mp = Me.Master tb = mp. ...
C# Orcas: Master Page & Find Control Page.Master.FindControl("Content_YourContent"); TextBox YourTxt = (TextBox) MYcontent.FindControl("MyTxt"); string mystring = YourTxt.Text; It worked for me . ...

Videos:
How To Add Newsletter Mailing List Homestead Websites http://www.websiteproducts.homestead.com The first step in creating (or, adding) a newsletter mailing list for a Homestead website will be to cre...




Search This Site:










asp.net vb, data reading images

"file > save page as"

how to go about?

how to pull data from a remote server to the web server. initiated by the web server session.

creating events in c#

used to work in 1

linkbutton

return to previouspage

printing labels

open a new window inside datagrid passing querystring? need info

image display problem

flicker free navigation

changing the format of date

design question

browsercaps on 2.0?

server.mappath("database.mdb") not working

.net framework

dynamic creation of usercontrols

hashtable order

how can i go about update a database record in a datareader loop

postback

http://www.localhost.com

asp.net authentication

how to enable browser to compress(gzip) http request ?

unique pages when a user creats an account????

beta 2 refresh?

adding dynamic linkbuttons...

search engine (recommendation)

session in c# and error....

capturing information from ups when power is down

  Privacy | Contact Us
All Times Are GMT