Deloittte Interview Questions on .. Net {3+yrs experienced}

Answer Posted / abhinaw kaushik

3)How to call javascript from c# code under button_click
without using Button1.Attributes.Is there any method?

Ans : Easiest way will be call the javascript function
omClientClick oh button.

e.g.
test.aspx page

<script type="text/javascript">
function something()
{
if(true) //your logic goes here
{
return true
}
else
{
return false
}
}
</script>

<asp:button id="btnHit" runat="server" text="check"
OnClientClick="return something();">


----------------
Q. How to call javascript function from webform1 to webform2?

Ams : Put that javascript in a separate file e.g text.js

refer this src to all your aspx pages.
e.g.
<script type="text/javascript" src="test.ja"></script>

Is This Answer Correct ?    29 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sks Microfinance

966


Hi.. Guys Im pranitha, presently im working in a organisation & im look for job at MNC's like DELL, Delloitte, Bank of America, Genpect, etc., I have completed B.com . Pls help me...

1130


i want the sample placement paper of goldman sachs urgently. please send it to me

3911


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

770


what is placement paper?

2137






Danlaw placement questions and answers

1338


what you will do when you struck in traffic ?

1034


my question is : reverse a string in COBOL program (please write a code asap) input file: 1234abcdef output file: 8765_____ abc*$#1___ 1_2_3_4__ cdef____ghi h_k_z_a__ a_z_k_h___ ihg____ghi 4_3_2_1___ 1#$*cba__ ______5678 fedcb4321

1283


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

1177


speak 1min on topic Travelling,memorable moment ,memorable day?

1725


What were the occupations of the people who lived within the Mauryan Empire?

568


printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); whats the output

1380


Do we have vacancy for HR RECRUITER ?

1366


Zero setting of sejong rottary press

1184


aptitude

680