Getting access to an html tag from the aspx.cs file


/ Published in: C#
Save to your folder(s)

by adding the runat="server" text to the p tag, we allow the .cs file to have access to it.


Copy this code and paste it in your HTML
  1. aspx code:
  2.  
  3. <p id="jobDescription" runat="server">job details</p>
  4.  
  5.  
  6. .cs code:
  7.  
  8. jobName = jobDescription;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.