I'm working on a project and whenever I try to load this page it gives me the same error everytime. Project is being worked on in Visual Studio 2015. What the goal is that users can fill in their name, email and a message they want to send to the owner of the site. Whenever the user is done with the message they click on the button, the button with the text verzenden, and a message is shown below if it is sent correctly or not. The problem is not the code however, I can manage that on myself.
Html code , this is all wrapped in a contentplaceholder because I have made a masterpage for the project :
<form id="Form1" runat="server">
<table>
<tr>
<td>
<br />
<br />
<h1> Stuur ons een berichtje</h1>
<br />
<br />
<p>Alle berichtjes worden ook verstuurd naar info#waasseschrijnwerken.be. Als het correct is verstuurd ontvangt u een bevestigingsmail.</p>
<br />
<br />
<asp:Label ID="lblnaam" runat="server" Text="Naam: "></asp:Label>
<asp:TextBox ID="txtnaam" runat="server"></asp:TextBox>
<asp:Label ID="lblmail" runat="server" Text="Emailadres: "></asp:Label>
<asp:TextBox ID="txtmail" runat="server"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblbericht" runat="server" Text="Bericht: "></asp:Label>
<br />
<br />
<asp:TextBox ID="txtbericht" runat="server" Height="200px" Width="750px"></asp:TextBox>
<br />
<br />
<br />
<asp:Button ID="btnVerzend" runat="server" Text="Verzenden" />
<br />
<br />
<br />
<asp:Label ID="lblres" runat="server" Text="Label" Visible="False"></asp:Label>
<br />
<br />
<br />
</td>
</tr>
</table>
</form>
Translation: One page can only have one form-label with runat server
Check the masterpage for a <form> tag with runat="server". ASP.NET only allows one of these per page.
You can just remove it from your code above;
<table>
<tr>
<td>
<br />
<br />
<h1> Stuur ons een berichtje</h1>
<br />
<br />
<p>Alle berichtjes worden ook verstuurd naar info#waasseschrijnwerken.be. Als het correct is verstuurd ontvangt u een bevestigingsmail.</p>
<br />
<br />
<asp:Label ID="lblnaam" runat="server" Text="Naam: "></asp:Label>
<asp:TextBox ID="txtnaam" runat="server"></asp:TextBox>
<asp:Label ID="lblmail" runat="server" Text="Emailadres: "></asp:Label>
<asp:TextBox ID="txtmail" runat="server"></asp:TextBox>
<br />
<br />
<asp:Label ID="lblbericht" runat="server" Text="Bericht: "></asp:Label>
<br />
<br />
<asp:TextBox ID="txtbericht" runat="server" Height="200px" Width="750px"></asp:TextBox>
<br />
<br />
<br />
<asp:Button ID="btnVerzend" runat="server" Text="Verzenden" />
<br />
<br />
<br />
<asp:Label ID="lblres" runat="server" Text="Label" Visible="False"></asp:Label>
<br />
<br />
<br />
</td>
</tr>
</table>
Related
i'm building a site for course project in Web forms asp.net
and i did a master page for all the website
i want to have a text box that acts as a search in the website
but it needs to be in
<form runat="server">
this is master code
<html>
<div id="topContent">
<head runat="server">
<form runat="server">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<asp:ContentPlaceHolder ID="head" runat="server"></asp:ContentPlaceHolder>
<title>Dor Lugasi Guitar Shop</title>
<link href="Styles.css" rel="stylesheet" type="text/css" />
<right>
<img src="../Images/logobk2.png" alt="Powered by DLG!" class="auto-style7"/><br />
<center id="headdiv">
<asp:LinkButton ID="lnkHome" runat="server" PostBackUrl="~/Pages/Home.aspx" >Home</asp:LinkButton>
<asp:LinkButton ID="lnkLogin" runat="server" PostBackUrl="~/Pages/Login.aspx">Login</asp:LinkButton>
<asp:LinkButton ID="lnkContact" runat="server" PostBackUrl="~/Pages/Contact.aspx" >Contact</asp:LinkButton>
<asp:LinkButton ID="lnkGuitarLab" runat="server" PostBackUrl="~/Pages/GuitarLab.aspx">Guitar Lab</asp:LinkButton>
<asp:ImageButton style="float:left;margin-left:10px;" ID="btnCart" runat="server" Height="55px" ImageUrl="~/Images/cart.png" Width="55px" PostBackUrl="~/Pages/Cart.aspx" />
<asp:TextBox ID="txtSearch" runat="server" BackColor="Silver" BorderColor="Black" TextMode="Search" placeholder=" Search" onkeypress="txtSearch"></asp:TextBox>
<asp:ImageButton ID="btnSearch" runat="server" ImageUrl="~/Images/src.png" OnClick="btnSearch_Click" Width="25px" />
</center>
<center id="headdiv" class="auto-style6">
<asp:Label style="float:left;margin-left:10px;" ID="lblLoggedUser" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Red"></asp:Label>
<asp:LinkButton ID="btnLogOut" runat="server" OnClick="btnLogOut_Click" Visible="False" CssClass="auto-style5" Height="24px" Width="99px">Log Out</asp:LinkButton>
<asp:LinkButton style="float:right;margin-right:10px;" ID="lnkManageProducts" runat="server" PostBackUrl="~/Pages/ManageProducts.aspx">Manage Products</asp:LinkButton>
<asp:LinkButton style="float:right;margin-right:10px;" ID="lnkManageUsers" runat="server" PostBackUrl="~/Pages/ManageUsers.aspx">Manage Users</asp:LinkButton>
</center>
</form>
</head>
</div>
<body id="body">
<form runat="server">
<center>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</center>
<footer id="footer" class="auto-style3">
</left>
<img src="../Images/logowhite.png" alt="Powered by ASP.NET!" />
</footer>
</form>
</body>
</html>
but im getting a:
A page can have only one server-side Form tag.
before i added this search textbox and button i had
<form runat="server">
<html>
...
<head>.....</head>
<body>....</body>
<footer>.....</footer>
</html>
</form>
and it worked
but at the login page when i pressed Enter it applied to the search form instead of the login form
eventually i ended up making a single form for the page and just put the specific form that had buttons in
<asp:Panel ID="search_panel" runat="server" DefaultButton="btnSearch">
<asp:TextBox ID="txtSearch" runat="server" BackColor="Silver" BorderColor="Black" TextMode="Search" placeholder=" Search" onkeypress="txtSearch"></asp:TextBox>
<asp:ImageButton ID="btnSearch" runat="server" ImageUrl="~/Images/src.png" OnClick="btnSearch_Click" Width="25px" />
</asp:Panel>
i hope thats the right way
I try to create this type of sign in page in bootstrap
http://v4-alpha.getbootstrap.com/examples/signin/
but before this i already create page but this is not bootstrap
code
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Mainpage.aspx.cs" Inherits="project.Mainpage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>System</title>
<link href="Styles/login.css" rel="stylesheet" />
<link href="Styles/main.css" rel="stylesheet" />
<link href="Content/bootstrap.css" rel="stylesheet" />
<!-- Google Web fonts -->
<link href='http://fonts.googleapis.com/css?family=Raleway:400,500,600,700,800' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,800,700,600' rel='stylesheet' type='text/css'/>
</head>
<body style="background-image:url(images/slide07.jpg);background-repeat:no-repeat">
<img class="logo" alt="LOGO" src="images/logomain.png" />
<br /><br />
<form id="form1" runat="server" class="fordiv">
<div id="box">
<span>
<img src="images/none.png" id="avtar" />
</span>
<div style="margin-left: 190px;margin-top: -170px";>
<span>
<asp:TextBox CssClass="textbx" ID="txt_us" runat="server" placeholder="Enter UserName"></asp:TextBox><br /><br />
</span>
<span>
<asp:TextBox CssClass="textbx" ID="txt_pwd" runat="server" placeholder="Enter Password" TextMode="Password"></asp:TextBox><br /><br />
</span>
<span>
<asp:Button ID="Button1" CssClass="button" runat="server" Text="LOGIN" OnClick="Button1_Click" />
</span>
</div>
</div><br /><br />
<asp:Label ID="Label1" CssClass="info" visible="false" runat ="server" Text="" BorderColor="Black"></asp:Label>
</form>
<table class="table" style="border: medium groove #FFFFFF; width: 100%; margin-top: 200px; ">
<tr>
<td>
<img style="margin-left: 10px;" src="images/passd.jpg" />
</td>
<td>
<img src="images/1.jpg" />
</td>
<td>
<img src="images/2.jpg" />
</td>
<td>
<img src="images/3.jpg" />
</td>
<td>
<img src="images/4.jpg" />
</td>
</tr>
</table>
<br /><br /><br />
</body>
</html>
now i try to create bootstrap responsive and i tried this
<div class="container">
<img class="logo" alt="LOGO" src="images/logomain.png" /><br /><br />
<form class="form-signin" runat="server" >
<h2 class="form-signin-heading">Please sign in</h2><br /><br />
<label for="inputEmail" class="sr-only">Email address</label>
<asp:TextBox CssClass="textbx" ID="txt_us" runat="server" placeholder="Enter UserName"></asp:TextBox><br /><br />
<label for="inputPassword" class="sr-only">Password</label>
<asp:TextBox CssClass="textbx" ID="txt_pwd" runat="server" placeholder="Enter Password" TextMode="Password"></asp:TextBox>
<br /><br />
<asp:Button ID="Button1" CssClass="button" runat="server" Text="LOGIN" OnClick="Button1_Click" />
<asp:Label ID="Label1" CssClass="info" visible="false" runat ="server" Text="" BorderColor="Black"></asp:Label>
</form>
</div>
but this shows awkward display
any solution?
Well, for responsive design you should be using using bootstraps's grid system.
I think you should read a bit about about responsive design here and the bootstrap grid system here.
When my page loads, after about 5 seconds, the window scrolls to an html video which is a significant ways down the page (which is on autoplay). This has been an issue following the Safari 10 release. Anyone know why this may be the case?
I'm having the same issue - if I remove the autoplay attribute it doesn't happen.
Initiating autoplay via JS (ou even starting the video from the console) makes the page jump as well.
it's the "controls" attribute on the HTML, i've found that the new update on Safari is giving few issues, have a look at this: https://stackoverflow.com/questions/42692679/video-tag-on-safari-10-goes-up-after-few-seconds
i did reproduce your issue (mixing it with mine on that question) on Jsfiddle:
https://jsfiddle.net/antonino_R/d9tf0va3/15/
(scroll down and run again to reproduce the issue, you may need to run and scroll quickly down again)
and removing "controls" does fix the issue https://jsfiddle.net/antonino_R/d9tf0va3/16/
<div class="wrapper">
<div class="wrapper-inner">
<div class="wrapper-video">
<video autoplay loop muted >
<source src="http://techslides.com/demos/sample-videos/small.mp4" type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
</video>
</div>
<div class="site-centered clearfix">
<header class="entry-header">
<h1 class="entry-title">this is a title</h1>
<h2 class="entry-subtitle">this is some text</h2>
</header>
</div>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h4>this is to scroll down the page and test that it goes up after few seconds</h4>
obviously if the controls are needed this fix isn't good enough
At first, you have to add this piece of code in footer:
<script>
var myVideo = document.getElementsByTagName("video")[0];
myVideo.controls = "";
</script>
This worked for me. Before i had problem that after 5 sec when website loaded, just jumped to section with video background. I had there overlay image and without value min-height: ___px; overlay was shorter than video height.
I have looked at all the examples posted and none seem to work for me.
I have the following on an asp .net page
<div style="background-color:#EFEFEF">
<div style="float: left;height: 24px">
<asp:Image ID="PFDExpandColapseImg" runat="server" /> <asp:Label ID="PFDOrgPayDateStatus" runat="server"></asp:Label>
</div>
<div style="float: right;height: 24px">
<asp:ImageButton ID="PFDAuthorizePending" OnClick="PFDAuthorizePending_Click" runat="server" />
<asp:imagebutton ID="PFDReplicate" OnClick="PFDReplicate_Click" runat="server" />
<asp:ImageButton ID="PFDSubmit" OnClick="PFDSubmit_Click" runat="server" />
<asp:ImageButton ID="PFDApprove" OnClick="PFDApprove_Click" runat="server" />
<asp:ImageButton ID="PFDReject" OnClick="PFDReject_Click" runat="server" />
<asp:ImageButton ID="PFDHistory" OnClick="PFDHistory_Click" runat="server" />
<asp:ImageButton ID="PFDDelete" OnClick="PFDDelete_Click" runat="server" />
<asp:ImageButton ID="PFDEdit" OnClick="PFDEdit_Click" runat="server" />
<asp:ImageButton ID="PFDViewExceptions" OnClick="PFDViewExceptions_Click" runat="server" />
<asp:Button ID="PFDEditEmployee" OnClick="PFDEditEmployee_Click" runat="server" />
</div>
<div style="clear: both"></div>
</div>
I am trying to get the the PFDExpandColapseImg and the PFDOrgPayDateStatus to be vertically aligned middle.
If anyone can help it would be very much appreciated.
Some suggested the following to me and it works
<div style="background-color:#EFEFEF">
<div style="float: left;display:flex;align-items:center;height: 24px">
<asp:Image ID="PFDExpandColapseImg" runat="server" /> <asp:Label ID="PFDOrgPayDateStatus" runat="server"></asp:Label>
</div>
<div style="float: right;height: 24px">
<asp:ImageButton ID="PFDAuthorizePending" OnClick="PFDAuthorizePending_Click" runat="server" />
<asp:imagebutton ID="PFDReplicate" OnClick="PFDReplicate_Click" runat="server" />
<asp:ImageButton ID="PFDSubmit" OnClick="PFDSubmit_Click" runat="server" />
<asp:ImageButton ID="PFDApprove" OnClick="PFDApprove_Click" runat="server" />
<asp:ImageButton ID="PFDReject" OnClick="PFDReject_Click" runat="server" />
<asp:ImageButton ID="PFDHistory" OnClick="PFDHistory_Click" runat="server" />
<asp:ImageButton ID="PFDDelete" OnClick="PFDDelete_Click" runat="server" />
<asp:ImageButton ID="PFDEdit" OnClick="PFDEdit_Click" runat="server" />
<asp:ImageButton ID="PFDViewExceptions" OnClick="PFDViewExceptions_Click" runat="server" />
<asp:Button ID="PFDEditEmployee" OnClick="PFDEditEmployee_Click" runat="server" />
</div>
<div style="clear: both"></div>
</div>
I know that the :before, and :after pseudo elements are not supported in empty elements, but what about these:
<select>
<option>
<textarea>
<button>
A list would be nice! Thanks guys!
I put together a list of every HTML element. Some aren't even legal where they're used... but it still seems to work.
If it says "it works" in green letters, that element is supported.
*:not(br):after {
content: 'it works';
font-weight: bold;
padding: 5px;
color: green;
}
<a>Name: a</a> <br />
<abbr>Name: abbr</abbr> <br />
<address>Name: address</address> <br />
<area>Name: area</area> <br />
<article>Name: article</article> <br />
<aside>Name: aside</aside> <br />
<audio>Name: audio</audio> <br />
<b>Name: b</b> <br />
<base>Name: base</base> <br />
<bdo>Name: bdo</bdo> <br />
<blockquote>Name: blockquote</blockquote> <br />
<body>Name: body</body> <br />
<br>Name: br</br> <br />
<button>Name: button</button> <br />
<canvas>Name: canvas</canvas> <br />
<caption>Name: caption</caption> <br />
<cite>Name: cite</cite> <br />
<code>Name: code</code> <br />
<col>Name: col</col> <br />
<colgroup>Name: colgroup</colgroup> <br />
<command>Name: command</command> <br />
<datalist>Name: datalist</datalist> <br />
<dd>Name: dd</dd> <br />
<del>Name: del</del> <br />
<details>Name: details</details> <br />
<dfn>Name: dfn</dfn> <br />
<div>Name: div</div> <br />
<dl>Name: dl</dl> <br />
<dt>Name: dt</dt> <br />
<em>Name: em</em> <br />
<embed>Name: embed</embed> <br />
<eventsource>Name: eventsource</eventsource> <br />
<fieldset>Name: fieldset</fieldset> <br />
<figcaption>Name: figcaption</figcaption> <br />
<figure>Name: figure</figure> <br />
<footer>Name: footer</footer> <br />
<form>Name: form</form> <br />
<h1>Name: h1</h1> <br />
<h2>Name: h2</h2> <br />
<h3>Name: h3</h3> <br />
<h4>Name: h4</h4> <br />
<h5>Name: h5</h5> <br />
<h6>Name: h6</h6> <br />
<head>Name: head</head> <br />
<header>Name: header</header> <br />
<hgroup>Name: hgroup</hgroup> <br />
<hr>Name: hr</hr> <br />
<html>Name: html</html> <br />
<i>Name: i</i> <br />
<iframe>Name: iframe</iframe> <br />
<img>Name: img</img> <br />
<input>Name: input</input> <br />
<ins>Name: ins</ins> <br />
<kbd>Name: kbd</kbd> <br />
<keygen>Name: keygen</keygen> <br />
<label>Name: label</label> <br />
<legend>Name: legend</legend> <br />
<li>Name: li</li> <br />
<link>Name: link</link> <br />
<mark>Name: mark</mark> <br />
<map>Name: map</map> <br />
<menu>Name: menu</menu> <br />
<meta>Name: meta</meta> <br />
<meter>Name: meter</meter> <br />
<nav>Name: nav</nav> <br />
<noscript>Name: noscript</noscript> <br />
<object>Name: object</object> <br />
<ol>Name: ol</ol> <br />
<optgroup>Name: optgroup</optgroup> <br />
<option>Name: option</option> <br />
<output>Name: output</output> <br />
<p>Name: p</p> <br />
<param>Name: param</param> <br />
<pre>Name: pre</pre> <br />
<progress>Name: progress</progress> <br />
<q>Name: q</q> <br />
<ruby>Name: ruby</ruby> <br />
<rp>Name: rp</rp> <br />
<rt>Name: rt</rt> <br />
<samp>Name: samp</samp> <br />
<script type="application/json">Name: script</script> <br />
<section>Name: section</section> <br />
<select>Name: select</select> <br />
<small>Name: small</small> <br />
<source>Name: source</source> <br />
<span>Name: span</span> <br />
<strong>Name: strong</strong> <br />
<style>Name: style</style> <br />
<sub>Name: sub</sub> <br />
<summary>Name: summary</summary> <br />
<details>Name: details</details> <br />
<sup>Name: sup</sup> <br />
<table>Name: table</table> <br />
<tbody>Name: tbody</tbody> <br />
<td>Name: td</td> <br />
<textarea>Name: textarea</textarea> <br />
<tfoot>Name: tfoot</tfoot> <br />
<th>Name: th</th> <br />
<thead>Name: thead</thead> <br />
<time>Name: time</time> <br />
<title>Name: title</title> <br />
<tr>Name: tr</tr> <br />
<ul>Name: ul</ul> <br />
<var>Name: var</var> <br />
<video>Name: video</video> <br />
<wbr>Name: wbr</wbr> <br />