c# - when I click on the submit button of contact us form . it automatically goes to top of the page . but i want to reload specific part of page -


I am developing a page website using asp.net, I have created contact form at the bottom of my page. The problem is that when I click the submit button on the submit form It automatically goes to the top of the page html code

  & lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; H2 & gt; Contact us & lt; / H2 & gt; & Lt; Br / & gt; & Lt; Table & gt; & Lt ;! - Name - & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; Name: & lt; / TD & gt; & Lt; TD & gt; & Lt; ASP: Text Box ID = "tttnname" run = "server" backallore = "transparent" column = "50" & gt; & Lt; / Asp: text box & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;! - subject - & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; Subject: & lt; / Td> & Lt; TD & gt; & Lt; Asp: text box id = "ddlSubject" runat = "server" & gt; & Lt; / Asp: text box & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;! - message - & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; Message: & lt; / Td> & Lt; TD & gt; & Lt; ASP: text box id = "text message" runat = "server" column = "40" lines = "6" textual = "multiline" & gt; & Lt; / Asp: text box & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;! - Submit - & gt; & Lt; Tr align = "center" & gt; & Lt; Td colspan = "2" & gt; & Lt; A href = "#btn job" & gt; & Lt; ASP: Submit Button ID = "BTN" "Run =" Server "Text =" Submit "onclick =" btnSubmit_Click "/> gt; & lt; / a & gt; & lt; / td & gt; & lt; / TR & gt; & lt;! - Results - & gt; & gt; Tr align = "center" & gt; & lt; td colspan = "2" & gt; asp: Label ID = "lblResult" Runat = "server" & gt; & lt; / asp: labels & gt; & lt; / TD & gt; & lt; / tr & gt; & lt; / table & gt; & lt; / div & gt; Use & lt; / form & gt; ` 

or if you actually Consider using AJAX for site development and want to do an SPA and simply webservices ltd Switch to.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -