Click here to Skip to main content
15,921,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table which is created at run time through c# code.



My code is

HTML
<pre lang="vb">_str_MainTag += "<TABLE id='tblTestDetails' cellSpacing='1' cellPadding='1' width='100%' border='1'>";
</pre>


_str_MainTag += "<TR class='AEHCuteLabel'><TD colspan=5 align=center >Eployee  
                                             
                 Details</TD></TR>";

_str_MainTag += "<TR class='AEHTRHeading' width=4% id=tr_"+ Empcode+">
                 <TD width=10%>Select</TD>
                 <TD colspan=2 width=48%>Name</TD>
                 <TD colspan=2 width=48%>designation</TD></TR>";





how to show and hide the table in c#.net .The table is created in the server side,by using C# code.


This table is to show the employee details ,when the employee code is
in database.It should be hide when there is no result or the employee code is invalid .

how to show and hide it in server side when i click the button.

please help me to free from this code search.
Posted
Comments
NAPorwal(8015059) 28-Nov-12 23:38pm    
let me know, once u have created ur table now how u showing this detail to UI, in some div tag or some other placeholder ?

1 solution

VB
fill the dataset emp by empcode if ds.tables(0).Rows.count>0
then
create table dynamically
_str_MainTag += "<TR class='AEHCuteLabel'><TD colspan=5 align=center >Eployee

                 Details</TD></TR>";

_str_MainTag += "<TR class='AEHTRHeading' width=4% id=tr_"+ Empcode+">
                 <TD width=10%>Select</TD>
                 <TD colspan=2 width=48%>" & ds.tabels(0).rows(0)("Name") & "</TD>
                 <TD colspan=2 width=48%>" & ds.tabels(0).rows(0)("designation") This is in vb u can convert to c#
 
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