Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


js fn to go to the particular page when enter is clicked



js fn to go to the particular page when enter is clicked..

Answer / sona

function DoPagingOnEnter()
{
var ControlPrefix = $get('<%
=hdnListViewClientID.ClientID%>').value;
if(!
(event.keyCode==48||event.keyCode==49||event.keyCode==50||ev
ent.keyCode==51||event.keyCode==52||event.keyCode==53||event
.keyCode==54||event.keyCode==55||event.keyCode==56||event.ke
yCode==57||event.keyCode==8||event.keyCode == 13))
{
event.returnValue=false;
}
else
{
var number = 0;
var Message;
var PrefixId = $get('<%=hdnNodeID.ClientID%
>').value;
number = $get(ControlPrefix+'txtPage').value;
if(!isNaN(number))
{
if (event.keyCode == 13)
{
var status ='1';
var PageFilter = /^[0-9]+$/;
if(!PageFilter.test($get
(ControlPrefix+'txtPage').value))
{
status='0';
}
else
{
number = parseInt(number);
var MaxPage = 0;
MaxPage = parseInt($get('<%
=hdnMaxPage.ClientID%>').value);
if(1 > number)
{
status ='0';
}
else if(number > MaxPage)
{
status ='0';
}
else
{
status ='1';
}
}
if(status == "0")
{
var mes = "<%
=CommonMessages.InvalidPage%>";
ShowMessage(mes,"<%
=CommonMessages.ErrorHeader%>",'Error');
content_resize();
return false;
}
else
{
__doPostBack
((PrefixId+'$btnPaging'), '');
}
}




<asp:Button ID="btnPaging" runat="server" Text="Button"
Style="height: 26px; display: none"
OnClick="btnPaging_Click" />

then the click event in code behind

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

Explain Model, view and Controllers in Asp.Net MVC?

0 Answers  


I'm anfinal yr. engg. student with knowledge of .net. I want to refurnish my knowledge for interview purpose. Which institute is good....I am confused among Peers, Naresh it, Deccansoft...Plz help me to select the right institute.....

9 Answers  


What is viewdata?

0 Answers  


How to bind table colum with gridview column?

0 Answers  


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

0 Answers  


Have you designed any components?

2 Answers   HP,


What are Satellite Assemblies? How you will create this?

4 Answers  


how many ways for pass the parameters in the fuction in c#

4 Answers  


What are the new enhancements done in default project template of asp.net mvc 4?

0 Answers  


differences between poco, model first and data first approach?

0 Answers   Microsoft,


What is RouteConfig.cs in ASP.Net MVC 4?

0 Answers  


Is it possible to unit test an mvc application without running the controllers in an asp.net process?

0 Answers  


Categories