Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

what are the 2 programming models supported by Silverlight?

Sunday, May 30, 2010


1. JavaScript API for Silverlight
2. Managed API for Silverlight


www.codecollege.NET

Daily Tips- Tip #47- How to disable client side script in validators?

Sunday, April 4, 2010


Set EnableClientScript property to false.


www.codecollege.NET

What is the use of $(document).ready() in jquery?

Sunday, March 7, 2010


with it you can put all your event driven javascript in one file, making it easy to maintain and upgrade later.


www.codecollege.NET

What is an HttpCombiner?

Wednesday, December 16, 2009


An HTTP handler that combines multiple CSS, Javascript or URL into one response for faster page load. It can combine, compress and cache response which results in faster page
load and better scalability of web application.


www.codecollege.NET

How to read a Session variable in javascript?

Friday, December 4, 2009


var jsUsername;
jsUsername = <%=Session["CurrentUser"]%>


www.codecollege.NET

What is the method which converts a JSON string into a JavaScript object?

Tuesday, October 27, 2009


JSON.parse(strJSON)


www.codecollege.NET

What is the attribute you need to set to make a method to return a JSON object?


[WebGet( RequestFormat=WebMessageFormat.Json )]


www.codecollege.NET

How will you detect the name of the browser using ASP.NET ?

Wednesday, October 7, 2009


You can find that using the following code (which detects whether it is IE)
if(Page.Request.Browser.Browser=="IE")
{
}



www.codecollege.NET

What is the scripting language JSON is based on?

Sunday, October 4, 2009


ECMAScript or ECMA-262.



www.codecollege.NET

What is JSON?


It is a Javascript Data serialization feature which does data persistance in a simple way where you require less code to read and write the data.



www.codecollege.NET

What is jQuery?

Thursday, October 1, 2009


It is basically a JavaScript framework for writing huge task of JavaScript with few lines of code. jQuery is a fast, concise, JavaScript Library that

simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages



www.codecollege.NET

What is the alias for the jQuery "class"?

Tuesday, September 22, 2009


$


www.codecollege.NET

What is the expansin of DOM ?


Document object model.


www.codecollege.NET

What is a callback function?


A callback is a function that is passed as an argument to another function and is executed after its parent
function has completed.


www.codecollege.NET

Tell some important functions in jQuery?


ready()
bind()
trigger()


www.codecollege.NET

What is the name of the new serializer that can be serialize and deserialize JSON objects to and from .NET introduced in .NET 3.5 ?

Wednesday, September 16, 2009


DataContractJsonSerializer


www.codecollege.NET

What is the Expansion of JSON ?


JavaScript Object Notation


www.codecollege.NET

How will you get the value of ASP.Net control in Javascript ?

Thursday, August 6, 2009


You can call the ASP.NET control from Javascript using the document.getElementById method.
Ex:
Let txtEmployeeName be a Textbox, then
var tEmp = document.getElementById('<%=txtEmployeeName.ClientID%>');


www.codecollege.NET

How will you add print functionality using Javascript in Asp.net ?

Monday, July 20, 2009


bPrint.Attributes("onclick") = "javascript.window.print();";


www.codecollege.NET

How will associate a clientside script with Asp.net Button server control ?


You can do it in 2 ways, they are:
1. Page.ClientScript.RegisterStartupScript() Method
2. Page.ClientScript.RegisterClientScriptBlock() Method

1. Page.ClientScript.RegisterStartupScript() Method
This class would be best used when you have a JavaScript function that you want to initiate when the page is loaded.

Ex:
Page.ClientScript.RegisterStartupScript(this.GetType(), "TestScript",
"function HelloWord() { alert('Hello World'); }", true);

btnTest.Attributes["onclick"] = "HelloWord()";

2. Page.ClientScript.RegisterClientScriptBlock() Method
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MethodA",
"JSCollections.js");




www.codecollege.NET


Daily Tips- Tip #14 - How will associate a clientside script with Asp.net Button server control ?
Blog Widget by LinkWithin