This is what i want 2 form in my navigation bar.
First is for Search Box
second is for username and password.login button

problem is if i put search box and login in same form then it gives weird look and formation error.

Now I want to use buttons in master page That needs to be run on server but can't run without 2nd form running on server.

Is there any alternative to use Textbox control button link button searchbox control without using <Form> Running on server.?

Here is the code

I'm using Bootstrap

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>




<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link href="Content/bootstrap.min.css" rel="Stylesheet" media="screen"/>

<nav class="navbar navbar-default" role="navigation" >
<div class="navbar-header">
<a class="navbar-brand" href="Default.aspx">Cafferia</a>
<form class="navbar-form navbar-left" role="search" runat="server">
<div class="form-group">
<asp:TextBox ID="SearchBox" class="form-control" placeholder="Search Box" runat="server"></asp:TextBox>
<button ID="SearchButton" type="submit" class="btn btn-default" runat="server" name="Search">
<form  class="navbar-form navbar-right" role="login" runat="server">
<div class="form-group">
<asp:TextBox ID="UserName" class="form-control" placeholder="UserName" runat="server"></asp:TextBox>
<asp:TextBox ID="Password" class="form-control" placeholder="UserName" runat="server"></asp:TextBox>
<div class="btn-group">
<button id="Login" type="submit" class="btn btn-group dropdown-toggle" data-toggle="dropdown" runat="server">Login<span class="caret" ></span>



4 Years
Discussion Span
Last Post by wazz

When developing in asp.net (web forms), the page can only have one form element. You need to place all of your controls within the one form element.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.