Click here to Skip to main content
15,928,734 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionjavascript in server control??? Pin
Tkml23627-Feb-07 7:52
Tkml23627-Feb-07 7:52 
AnswerRe: javascript in server control??? Pin
Marcus J. Smith27-Feb-07 8:24
professionalMarcus J. Smith27-Feb-07 8:24 
GeneralRe: javascript in server control??? urgent Pin
Tkml23627-Feb-07 8:46
Tkml23627-Feb-07 8:46 
GeneralRe: javascript in server control??? urgent Pin
Marcus J. Smith27-Feb-07 8:59
professionalMarcus J. Smith27-Feb-07 8:59 
GeneralRe: javascript in server control??? urgent Pin
kubben27-Feb-07 9:00
kubben27-Feb-07 9:00 
GeneralRe: javascript in server control??? urgent Pin
Tkml23627-Feb-07 9:14
Tkml23627-Feb-07 9:14 
GeneralRe: javascript in server control??? urgent Pin
kubben27-Feb-07 9:38
kubben27-Feb-07 9:38 
GeneralRe: javascript in server control??? urgent Pin
Michael Sync27-Feb-07 19:16
Michael Sync27-Feb-07 19:16 
1. Adding javascript function to button
btn.Attribute.Add("onclick","return Foo();")


2. No Post
function Foo(){
  //Do validation
  if(isNotValid)return false;
}


3. Accessing client-side variable from Server-side.
Add one Server-side Hidden Field.Then, Set the value to this hidden field from Javascript. And it's available to be accessed from Server-side code also..

More Info:

Read AskForComment() function and "Accessing the Client-side variable (variable named “str” in this sample ) from Server-side Code" from the following article.

http://michaelsync.net/2007/01/01/custom-javascript-dialog/

Hope, it would help.



Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

QuestionThe Close Button Pin
#realJSOP27-Feb-07 7:38
professional#realJSOP27-Feb-07 7:38 
AnswerRe: The Close Button Pin
Marcus J. Smith27-Feb-07 8:17
professionalMarcus J. Smith27-Feb-07 8:17 
GeneralRe: The Close Button Pin
#realJSOP27-Feb-07 8:28
professional#realJSOP27-Feb-07 8:28 
GeneralRe: The Close Button Pin
kubben27-Feb-07 8:36
kubben27-Feb-07 8:36 
GeneralRe: The Close Button Pin
Marcus J. Smith27-Feb-07 8:36
professionalMarcus J. Smith27-Feb-07 8:36 
QuestionPage Break problem in reporting services Pin
kalyan_vb27-Feb-07 7:16
kalyan_vb27-Feb-07 7:16 
QuestionHelp caching custom controls Pin
flamz27-Feb-07 5:29
flamz27-Feb-07 5:29 
AnswerRe: Help caching custom controls Pin
Marcus J. Smith27-Feb-07 8:21
professionalMarcus J. Smith27-Feb-07 8:21 
GeneralRe: Help caching custom controls Pin
flamz27-Feb-07 8:42
flamz27-Feb-07 8:42 
GeneralRe: Help caching custom controls Pin
Marcus J. Smith27-Feb-07 9:01
professionalMarcus J. Smith27-Feb-07 9:01 
GeneralRe: Help caching custom controls Pin
flamz27-Feb-07 9:11
flamz27-Feb-07 9:11 
QuestionValidator problem Pin
Tkml23627-Feb-07 4:51
Tkml23627-Feb-07 4:51 
AnswerRe: Validator problem Pin
badgrs27-Feb-07 5:27
badgrs27-Feb-07 5:27 
GeneralRe: Validator problem Pin
Tkml23627-Feb-07 5:36
Tkml23627-Feb-07 5:36 
GeneralRe: Validator problem Pin
badgrs27-Feb-07 5:48
badgrs27-Feb-07 5:48 
GeneralRe: Validator problem Pin
Tkml23627-Feb-07 7:49
Tkml23627-Feb-07 7:49 
GeneralRe: Validator problem Pin
szukuro27-Feb-07 22:48
szukuro27-Feb-07 22:48 

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.