Click here to Skip to main content
15,913,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Well guys I am new to .net and this is my first project.the design is already made by the designer.
He has used html and jquery controls (some .css and .js files are there in folders) .I have planned to change the html control to asp.net control by writing runat=server wherever required.can i do like this?
Posted

Yes, of course. You also need to handle the server-side events wherever required.
 
Share this answer
 
Comments
rakeshjena 11-Nov-13 7:41am    
thanks for the quick response.i changed a html button to asp.net button but the click event is not getting fired. i changed the code from
<div class="btn-spinner"><div class="spinner hidden"></div><input type="submit" value="Sign Up" name="Proceed" class="btn active btn-register" /></div><div class="or-text">Or</div></form></div><div class="register-social pull-right"></div></div>
to
<div class="btn-spinner"><div class="spinner hidden"></div><asp:Button ID="btnsignup" runat="server" Text="sign up" OnClick="btnsignup_Click1" />/></div><div class="or-text">Or</div></form></div><div class="register-social pull-right"></div></div>

took a break point on button click method but not firing.waiting for your reply
It should fire. Can you show me the button click event code?
rakeshjena 13-Nov-13 0:37am    
The UI code is too large.i have wrapped it in form so it is showing no error.and yes the page load method is getting fired but not the button click simply to test this i wrote
protected void btnsignup_Click1(object sender, EventArgs e)
{ Response.Redirect("www.google.com");
}
Okay now do one thing. Go to design view of button. Double click on the button. It will automatically take you to the click event. Check if it taking to this btnsignup_Click1 event or not?
rakeshjena 13-Nov-13 0:54am    
simply to test this i wrote protected void btnsignup_Click1(object sender, EventArgs e) { Response.Redirect("www.google.com"); } but on the url it is showing the textbox values like......http://localhost:5167/home.aspx?TextBox1=adasdf&TextBox2=dfsdfsdfsdf&TextBox3=rzsdasdsfs%40gmail.com&TextBox4=9861463190&TextBox5=awetedfq1gdfgdfgasdesfsfddA!&TextBox6=awetedfq1gdfgdfgasdesfsfddA!&Button1=SIGN+UP#
Answer is you could do that way. And you have to handle the events.

But I suggest you to go with Server side controls[^] because those controls has many properties, using those you could enjoy many advantages(like secure, less code, etc.,).

Similar question with answer
How to convert HTML TO ASP .NET[^]

Other details which are useful for you.
HTML and ASP.NET Server Controls[^]
.NET Code Conversion - Convert your code - ASP to .NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900