Deloittte Interview Questions on .. Net {3+yrs experienced}
Answer Posted / ramasubbareddy
Quest:How to call javascript from c# code under button_click
without using Button1.Attributes.Is there any method?
Answer: Yes, There is a PageMethod is used to call javascript from code behind
Example:
========
If i need to pass a value from .aspx to C# codebehind
I need to follow this:
Enable pagemethods= true in your script manager
then
write a function :
<script language ="javascript">
function sendvalue()
{
pagemethod.GetValue("Hello this is test");
}
</script>
C# code:
========
[webmethod]
public static void GetValue(string input)
{
Response.Write(input);
}
OUTPUT:
=======
Hello this is test
Note:
always use static otherwise it will not work
If your not clear with the above solution give me a request i will send original code mail me @ reddy_reddymgr@yahoo.co.in
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
what is difference between uv and visible spectroscopy and how to differentiate the drug compounds in uv visible region
your project to describe and tell about : 1. My favorite things 2. My favorite places at home 3. Animals *Choose one of them to describe *Write on your paper *If you done, Send me *Did you get it
What kind of Issues/bugs arise in ETL projects? I would like to know few issues (critical to somewhat bugs ) normally occur in ETL process especially when testing? Domains can be banking, retail or any.
what is placement paper?
email me previous question papers of bob bank for po exams
What were the occupations of the people who lived within the Mauryan Empire?
Zero setting of sejong rottary press
i want the sample placement paper of goldman sachs urgently. please send it to me
Danlaw placement questions and answers
Recently conducted Apptitude test
my question is : reverse a string in COBOL program (please write a code asap) input file: 1234abcdef abc*$#1___ cdef____ghi a_z_k_h___ 4_3_2_1___ ______5678 output file: 8765_____ 1_2_3_4__ h_k_z_a__ ihg____ghi 1#$*cba__ fedcb4321
Sks Microfinance
printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); whats the output
Do we have vacancy for HR RECRUITER ?
how did you celebrate your last birthday?