Click here to Skip to main content
15,887,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
El_Programmer31-Mar-11 11:11
El_Programmer31-Mar-11 11:11 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
Not Active31-Mar-11 11:54
mentorNot Active31-Mar-11 11:54 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
El_Programmer31-Mar-11 12:01
El_Programmer31-Mar-11 12:01 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
Not Active31-Mar-11 12:05
mentorNot Active31-Mar-11 12:05 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
Not Active31-Mar-11 12:01
mentorNot Active31-Mar-11 12:01 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
Diyaa Hamza31-Mar-11 12:34
Diyaa Hamza31-Mar-11 12:34 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
Not Active31-Mar-11 13:26
mentorNot Active31-Mar-11 13:26 
GeneralRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
ktrrzn5-Apr-11 15:51
ktrrzn5-Apr-11 15:51 
Hi,

I suggest this solution, it works for me.

in your JS add variable, and assign the ClientID of ur label control.

<script type="text/javascript">
var slbltime = '<%=lbltime.ClientID%>'

window.onload = WindowLoad;
function WindowLoad(event) {

ActivateCountDown("CountDownPanel1", document.getElementById(slbltime).value, "CountDownEnded1");

}
</script>


bcoz when .Net render asp control to html control, they need to give id to it.
if u use asp:label control, the id will transform into 'Master_ct00_lbltime' something like that.

as far as i know, what other member want to say is if u assign value into ur label control from code behind file(.aspx.cs)
u need to do b4 PreRender state of page life cycle.

PreRender is the state b4 the asp:control are actually transform into html control to send it to the web browser.

Hope it works!
AnswerRe: document.getElementById Not work With Masterpage ASP.Net VB Pin
GenJerDan31-Mar-11 17:27
GenJerDan31-Mar-11 17:27 
QuestionHelp with regular expression for reg ex validator Pin
TimWallace31-Mar-11 7:50
TimWallace31-Mar-11 7:50 
AnswerRe: Help with regular expression for reg ex validator Pin
Not Active31-Mar-11 8:15
mentorNot Active31-Mar-11 8:15 
GeneralRe: Help with regular expression for reg ex validator Pin
TimWallace31-Mar-11 8:19
TimWallace31-Mar-11 8:19 
AnswerRe: Help with regular expression for reg ex validator Pin
WaqasYousuf31-Mar-11 8:24
WaqasYousuf31-Mar-11 8:24 
GeneralRe: Help with regular expression for reg ex validator Pin
TimWallace1-Apr-11 6:35
TimWallace1-Apr-11 6:35 
QuestionNeed some help, what would I do ? Pin
msqar31-Mar-11 2:52
msqar31-Mar-11 2:52 
AnswerRe: Need some help, what would I do ? Pin
Keith Barrow31-Mar-11 4:04
professionalKeith Barrow31-Mar-11 4:04 
GeneralRe: Need some help, what would I do ? Pin
msqar31-Mar-11 4:15
msqar31-Mar-11 4:15 
Questionregular expression Pin
fififlowertot31-Mar-11 2:32
fififlowertot31-Mar-11 2:32 
AnswerRe: regular expression Pin
Pete O'Hanlon31-Mar-11 4:06
mvePete O'Hanlon31-Mar-11 4:06 
QuestionVertical slide show Java script Pin
venu65630-Mar-11 22:57
venu65630-Mar-11 22:57 
AnswerCross post Pin
Not Active31-Mar-11 2:34
mentorNot Active31-Mar-11 2:34 
GeneralRe: Cross post Pin
venu6561-Apr-11 2:35
venu6561-Apr-11 2:35 
GeneralRe: Cross post Pin
Not Active1-Apr-11 3:06
mentorNot Active1-Apr-11 3:06 
QuestionCookies question. [modified] Pin
buffering8330-Mar-11 17:51
buffering8330-Mar-11 17:51 
AnswerRe: Cookies question. Pin
Dejan Bozic30-Mar-11 21:40
Dejan Bozic30-Mar-11 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.