Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

I need ur help...

I have a div and made it has runat="server" & creating tables dynamically by
calling function in javascript and i can get all the ID created inside the table
like lable, textbox etc... and going all calculation.

My Problem is,
When I click save button, I cant able to get any ID'd (lable, textbox etc...)


DESIGN CODE....

<div id="div1" runat="server">


C# CODE...

TextBox txt = FindControl("txt_ItemCode_" + i) as TextBox;
OR
ItemCode = Request.Form["txt_ItemCode_" + i];


Here in both codes I'm getting null (can't get ID)


Thanks,
Praveen
Posted

1 solution

It looks like you have declared the DIV as a server side object by adding the
runat="server"


Then your using clientside (javascript) to access it,
maybe that is the problem?
 
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