Click here to Skip to main content
15,903,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
J4amieC10-Sep-09 6:05
J4amieC10-Sep-09 6:05 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
N a v a n e e t h10-Sep-09 6:10
N a v a n e e t h10-Sep-09 6:10 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Abhishek Sur10-Sep-09 11:21
professionalAbhishek Sur10-Sep-09 11:21 
AnswerRe: Error Use of unassigned local variable 'ClientScript' Pin
Abhishek Sur10-Sep-09 5:10
professionalAbhishek Sur10-Sep-09 5:10 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Md. Marufuzzaman10-Sep-09 5:27
professionalMd. Marufuzzaman10-Sep-09 5:27 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Abhijit Jana10-Sep-09 5:33
professionalAbhijit Jana10-Sep-09 5:33 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Md. Marufuzzaman10-Sep-09 5:55
professionalMd. Marufuzzaman10-Sep-09 5:55 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Abhishek Sur10-Sep-09 9:04
professionalAbhishek Sur10-Sep-09 9:04 
Yes... RegisterStartupScript places the script after all the objects are rendered while RegisterClientScriptBlock places the JS at the beginning.

Thus say you are calling a javascript using RegisterClientScriptBlock which gets an element, you will find this null, as the script gets executed just before any html is rendered. In case of RegisterStartupScript the script is placed after the html is generated. So If you want to place a javascript call in your html, always use RegisterStartupScript.

Hope you got it. If not I can give you examples. Smile | :)

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Md. Marufuzzaman10-Sep-09 19:58
professionalMd. Marufuzzaman10-Sep-09 19:58 
GeneralRe: Error Use of unassigned local variable 'ClientScript' Pin
Abhishek Sur10-Sep-09 22:14
professionalAbhishek Sur10-Sep-09 22:14 
QuestionInput values are lost in postback Pin
smraj150310-Sep-09 1:51
smraj150310-Sep-09 1:51 
AnswerRe: Input values are lost in postback Pin
sashidhar10-Sep-09 1:53
sashidhar10-Sep-09 1:53 
GeneralRe: Input values are lost in postback Pin
smraj150310-Sep-09 1:59
smraj150310-Sep-09 1:59 
GeneralRe: Input values are lost in postback Pin
sashidhar10-Sep-09 2:04
sashidhar10-Sep-09 2:04 
GeneralRe: Input values are lost in postback Pin
smraj150310-Sep-09 2:11
smraj150310-Sep-09 2:11 
AnswerRe: Input values are lost in postback Pin
Abhijit Jana10-Sep-09 2:36
professionalAbhijit Jana10-Sep-09 2:36 
General[Message Deleted] Pin
smraj150310-Sep-09 3:04
smraj150310-Sep-09 3:04 
GeneralRe: Input values are lost in postback Pin
Manas Bhardwaj10-Sep-09 3:25
professionalManas Bhardwaj10-Sep-09 3:25 
GeneralRe: [Message Deleted] Pin
Abhijit Jana10-Sep-09 5:34
professionalAbhijit Jana10-Sep-09 5:34 
AnswerRe: Input values are lost in postback Pin
Abhishek Sur10-Sep-09 5:19
professionalAbhishek Sur10-Sep-09 5:19 
GeneralRe: Input values are lost in postback Pin
Abhijit Jana10-Sep-09 5:34
professionalAbhijit Jana10-Sep-09 5:34 
GeneralRe: Input values are lost in postback Pin
Abhishek Sur11-Sep-09 5:59
professionalAbhishek Sur11-Sep-09 5:59 
Questionauthentication C# ASPX Pin
gitschi10-Sep-09 0:50
gitschi10-Sep-09 0:50 
AnswerRe: authentication C# ASPX Pin
Abhijit Jana10-Sep-09 1:05
professionalAbhijit Jana10-Sep-09 1:05 
QuestionRe: authentication C# ASPX Pin
gitschi10-Sep-09 3:59
gitschi10-Sep-09 3:59 

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.