Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to 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 26-Jun-13 8:46am
Comments
MaulikDusara at 26-Jun-13 14:18pm
   
Please show your .aspx and .aspx.cs code
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You have to Set property
runat="server"
of HTML controls
 
to use ID at codeBehind...... Smile | :)
 
Regards,
Nirav Prabtani.
  Permalink  
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..
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 505
1 Maciej Los 325
2 Richard MacCutchan 265
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411028.1 | Last Updated 27 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100