seensejuift
New Member
I have spend two days trying to figure out the solution to this problem, even tried ExpertExchange and still I can't get a solution. I am a very novice programmer to ASP.Net (using C#) and I DON'T want to use a string/url postI have a MasterPage of which has a textbox called tbSearchString. It is a simple box that a user can enter something and then it does a Postback to another page SearchResults.aspx So I also have other pages, like Default.aspx that uses the MasterPage. I have tried nearly everything and have read nearly every post I could find on the net and no mater what the Variables are always Null.I have use this code on the searchResults loadpage event and Every one of these variables are null, even though I enter a value in the page text box and click the button to postback to the SearchResults page, the only time it works is if I am on the searchResults page and submit.SearchResults back end page\[code\]protected void Page_Load(object sender, EventArgs e){ TextBox SearchString; TextBox SearchString2; TextBox SearchString3; TextBox SearchString5; if (Page.PreviousPage != null) //This is true on every test { SearchString = (TextBox)Page.PreviousPage.Master.FindControl("tbSearchString"); SearchString2 = (TextBox)PreviousPage.Master.FindControl("tbSearchString"); SearchString3 = (TextBox)Master.FindControl("tbSearchString"); TextBox LoginControlx = (TextBox)PreviousPage.FindControl("Form1"); if (LoginControlx != null) { TextBox SearchString4 = (TextBox)LoginControlx.FindControl("tbSearchString"); } }\[/code\]MainWebsite.Master page Code\[code\]<asp:TextBox ID="tbSearchString" runat="server"></asp:TextBox> <asp:Button ID="btnSearch1" runat="server" Text="Search" PostBackUrl="~/SearchResultRentalEquiptment.aspx" />\[/code\]I don't have anything in the CS backend pageSo on the Default.aspx pagenothing special Just the Masterpage and some text content, I enter some text in the textbox goes to the SearchResults page and I can not get the darn value from the Textbox control from the Default or any other page. What say you wise ones?