Posted by kiranpatils on May 30, 2009
Challenge:
How I generate <tbody> tag using Table, TableRow, etc … controls ?
I want to generate table o/p like this:
<table border="1">
<thead>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tbody>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>Sum</td>
<td>$180</td>
</tr>
</tfoot>
</table>
Src : http://www.w3schools.com/TAGS/tag_tbody.asp
I want to create table like this from my code
behind using .net f/w classes.
Solution:
TableRow.TableSection is the solution for it:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.tablerow.tablesection.aspx
for whatever row you create just provide it’s TableSetion property to appropriate section e.g Body,head etc.
Hope this helps
Happy Programming!!
Posted in ASP.NET, ASP.NET Controls | Leave a Comment »
Posted by kiranpatils on May 30, 2009
Background:
This post is dedicated to guys who do believe in OOPS or eager to learn OOPS Concepts[Like me
]. Our .NET F/w is built heavily on OOPS concepts. So, if you see take any Class like System.Web.UI.WebControls.TextBox if you see it’s CD and dig more in it you will learn a lot:
This is just one example if you take any Control/Class of .NET F/W you will understand more how it has been designed and why?
So it is always good to have all namespace and types poster with you always too look at it while you are having cup of coffee
So, Grab this and take a print out of it and have fun
Programming With Fun!!
Posted in .NET, Uncategorized | Tagged: .NET 2.0, .NET 3.5 | Leave a Comment »
Posted by kiranpatils on May 30, 2009
Background:
We all developers daily[On weekends also] use Visual Studio. And most of the time we do some common tasks like Comment Code[CTRL+K+C] and Uncomment Code[CTRL+K+U]. Some of us do Manually
//Single line comment
/* Multiline comment */
Or some of us use VS Toolbar for doing the same.
This is just one piece of stuff i told there are so many types of stuff which we do regularly. So why not use Shortcuts for that? Good idea..But from where can i find all the shortcuts for Visual Studio? Here it is:
Microsoft guys have published posters[in pdf format] for us:
Hope this helps to increase your productivity
Programming With Fun!!
Posted in Posters, VS 2005, VS 2008 | Tagged: Keyboard Shortcuts, VS 2005, VS 2008 | Leave a Comment »
Posted by kiranpatils on May 20, 2009
Hi folks Sorry for being invisible since so long. But i really got tied up with my bits.
Anyway today i have something to share with you all so here it is:
Challenge:
I have one JavaScript in which i am creating one table cell and adding it to table. It works fine in IE[As always
] But not in FF[As always
].
var newTable = document.createElement(‘table’);
var newRow = newTable.insertRow( );
var newCell1 = newRow.insertCell( );
Solution:
So, finally my friend Google helped me to find a way:
just pass –1 to insertCell Method and have a good sleep!
var newTable = document.createElement(‘table’);
var newRow = newTable.insertRow( );
var newCell1 = newRow.insertCell( -1);
Reason:
I don’t know. If you do please do let me know
Happy Programming!
Posted in Javascript | Tagged: Firefox, Javascript | 3 Comments »