I would use the ASP.NET <http://ASP.NET> panel control. .ASPX File: <asp:Panel ID="pnlLogin" Runat="server"> Username: <asp:TextBox ID="txtUserName" Runat="server" /> Password: <asp:TextBox ID="txtPassword" Runat="server" /> <asp:Button ID="btnLogin" OnClick="Login_Click" Runat="server" /> </asp:Panel> <asp:Panel ID="pnlSearch" Runat="server"> City: <asp:TextBox ID="txtCity" Runat="server" /> Pin: <asp:TextBox ID="txtPin" Runat="server" /> Phone: <asp:TextBox ID="txtPhone" Runat="server" /> <asp:Button ID="btnSearch" OnClick="Search_Click" Runat="server" /> </asp:Panel> <asp:Panel ID = pnlSearchRes" Runat="server> //Code here for search results </asp:Panel> Code Behind ... private void Page_Load (object sender, EventArgs e) { Initialize(); } private void Initialize() { pnlLogin.Visible = true; pnlSearch.Visible = false; pnlSearchRes.Visible = false; } public void Login_Click(object sender, EventArgs e) { //Code here to validate login and if login is successful then implement: pnlLogin.Visible = false; pnlSearch.Visible = true; pnlSearchRes.Visible = false; } public void Search_Click(object sender, EventArgs e) { //Code here for search pnlLogin.Visible = false; pnlSearch.Visible = false; pnlSearchRes.Visible = true; } ... You use ValidatorEnable to selectively disable RequiredFieldValidators on a web form: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp
On 6/26/05, Arindam <[EMAIL PROTECTED]> wrote: > > > In one page how can i have 2 Form > (I know we can write only one <Form id="form1" runat=server> ) > but > Suppose on the page i have > > Uid: <field > > Pass: <field> > [Submit Button] > > ****** AND ********** > > City : <field > > Pin: <field > > Phone: <field > > [Search Button] > > Every i have put RqdFieldValidator, RangeValidator etc. > but i want when i click on "Submit Button" then only that section related > RqdFieldValidator, > RangeValidator should react. > Not of other section. alternatively when i click on "Search Button" > earlier section shud not react. > > Thanks > Arindam > > > > Thanks & Regards > > Arindam > Web Designer & Developer > > > > > > --------------------------------- > How much free photo storage do you get? Store your friends n family photos > for FREE with Yahoo! Photos. > http://in.photos.yahoo.com > > [Non-text portions of this message have been removed] > > > ------------------------------ > YAHOO! GROUPS LINKS > > > - Visit your group > "AspNetAnyQuestionIsOk<http://groups.yahoo.com/group/AspNetAnyQuestionIsOk>" > on the web. > - To unsubscribe from this group, send an email to: > [EMAIL PROTECTED]<[EMAIL PROTECTED]> > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > > ------------------------------ > -- Thank you, Ryan Olshan <asp:WebProgrammer /> TeraNet Systems http://www.teranetsystems.com [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
