Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi I copied and pasted an .html page to an .aspx file in visual studio . I added id and runat server to a link button , added a form tag with runat server attribute and added this code at the first of my code :
%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HostDomain.aspx.cs" Inherits="project.HostDomain" %>

but usually when you double click on a controll you see the code behind and you can code there ...I cant see the element id in the code behind and the page generates an error... PLZ HELP
Posted
Comments
[no name] 26-Jun-13 14:18pm    
Please show your .aspx and .aspx.cs code

You have to Set property
C#
runat="server"
of HTML controls

to use ID at codeBehind...... :)

Regards,
Nirav Prabtani.
 
Share this answer
 
Comments
before runn ur program just go through once ur design ...
that means in ur .aspx page below spilt and design source are their..
once go for design and check it their if their any errors..
 
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