Friday, February 12, 2016

How to Create table using javascript

How to create table in javascript ?

use this below to create html table in javascript
html table like below will add to your div element dynamically
<table border="1">
<tr>
<td>
Hello world.
<td/>
<tr/>
<table/>

Code :
var tr,td;   ---variables for row and cell
var Table =document.createElement('TABLE'); ---Here table will create
Table.setAttribute("border",1);    -- adds border to table.
tr=Table.insertRow(0);  --- new row for Table
td=tr.insertCell(0) ;        ---- new cell for tr (Row)
td.innerHTML ="Hello World";   --- Text that you want to display

'lets add this table to Document.

document.getElementById('divMain').appendChild(Table);  --- Div is your body div where you want to add.

more example
for(i =0;i< 20;i++)
{
 tr=Table.insertRow(Table.rows.length);
td=tr.insertCell(tr.cells.length);
td.innerHTML="Hello";
td=tr.insertCell(tr.cells.length);
td=tr.insertCell(tr.cells.length);
td.innerHTML ="World";
 }

document.getElementById("divMain").appendChild("Table");



---- Queries post here.













Thursday, February 4, 2016

MVC 6 and Entity Frame work 6

Model view controller with entity framework we build the application easily.
by using MVC scaffolding.
What is MVC scaffolding it will creates table classes in application.
and take care of the relations between tables.... 

Friday, December 18, 2015

ScriptManager and ScriptManagerProxy in AJAX dotnet

Script Manager is parent control for AJAX to use ajax controls need place or drag drop the script manager control in aspx page.
If you have master page in your project place the control in master page nested pages not required to scriptmanager.
If you want use some ajax controls in nested pages with services then use script manager proxy control in nested page.
ex: auto complete control needs webservice
      webservices needs host, for that scriptmanager proxy control use ful such type of requirement.