Can we use the java script code in .Net Code behind?

Answers were Sorted based on User's Feedback



Can we use the java script code in .Net Code behind?..

Answer / zikku

yes we can use javascript in code behind.


Define the script block that contains the JavaScript
function. You can add this directly to the HTML of the page.


Insert the script block by the
Page.RegisterStartupScript() or the
Page.RegisterClientScriptBlock() method.

or by using updatepanel by raising an async postback using
JavaScript code

Is This Answer Correct ?    10 Yes 0 No

Can we use the java script code in .Net Code behind?..

Answer / mupnesh

yes we can use java script code.

Is This Answer Correct ?    1 Yes 0 No

Can we use the java script code in .Net Code behind?..

Answer / guest

yes

Is This Answer Correct ?    2 Yes 1 No

Can we use the java script code in .Net Code behind?..

Answer / raj

yes we can use java script code in .Net in code behind

suppose we have a validation on button click event based on id
button1
then

button1.attributes.add("OnClick",retun functionname);

Is This Answer Correct ?    1 Yes 1 No

Can we use the java script code in .Net Code behind?..

Answer / satish v itagi

I have made use of scripts in code behind. My client
wanted cursor to move from one web ui control to another in
a specific order based on the data fed/selected by user.
For eg. after entering specific word in a textbox, cursor
has to focus on save button bypassing all other ui
controls; if another specific word is entered focus should
jump on third ui control skipping the second, so on and so
forth.

User got delighted when the facility was given.

Another case where I implemented was to focus to next
control even after a post back event (otherwise smart
navigation returns focus to the same control after a post
back and use has to press tab key again to set focus to
next ui control).

This facility made my clients again happy.

Of course, it is more worthy to earn clients delight than
weighty pay packet!!!

Ofcourse, I used Page.RegisterStartupScript() and the
Page.RegisterClientScriptBlock() methods!

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More ASP.NET Interview Questions

What is postback and autopostback in asp.net?

0 Answers  


What is the difference between the response.write() and response.output.write() methods?

0 Answers  


what is diffrent between asp & asp.net

2 Answers  


i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?

0 Answers  


can u any one tell me clearly where is stored cache datas?

2 Answers   Apollo,


To add a hyperlink column to the DataGrid which tag is used ?

0 Answers   Siebel,


Which @page directive should you create an asynchronous page?

1 Answers  


Where sessions are stored in asp.net?

0 Answers  


How many time you can fill dataset in asp.net?

3 Answers   Syntel, Wipro,


What tags do you need to add within the asp:datagrid tags to bind columns manually

2 Answers  


Describe the difference between inline and code behind.

5 Answers   Siebel Systems,


What is the procedure to handle the process request using mhpm events fired? : asp.net mvc

0 Answers  


Categories