0

I am developing web application using Dot Net framework 2.0
On client side i am creating HTML elements(DIV,TextBox) at runtime using Javascript.
But i am not able to access them on server side using C#.
How to access dyanamically added elements on server side?
In some other function i can access these dynamically added elements by document.getElementById();
But how to access them on server side.
Here is Client side code

function addNewItem() 
{       

    var mainDiv=document.getElementById('MainDiv');

    var newDiv=document.createElement('div');
    newDiv.setAttribute('id','innerDiv');
    newDiv.setAttribute('runat','server');

    var newTextBox=document.createElement('input');
    newTextBox.type='text';
    newTextBox.setAttribute('id','txtAddr');
    newTextBox.setAttribute('runat','server');

    newDiv.appendChild(newTextBox);

    mainDiv.appendChild(newDiv);
    return true;
}

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.