3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by chakrimsis
0

Yes read up about AJAX, ASP.NET 2.0 has AJAX built in. for example by nesting a GridView inside an UpdatePanel you can execute a postback but without a full page re-render.

0

How can I work server side without refreshing web pages.like client side.
is it Possible?

The best thing is go with the AJAX
by using the AJAX u can refresh upto that panel only
if u dodn't want go with the AJAX
u may try this it is working fine
try the below code

When u press F6 button it will calls the serverside methods

For example take the TextBox if u want call the serverside code
Write the KeyDown on .aspx page like

 <asp:TextBox ID="txtVoucherNo" CssClass="TextBox" runat="server" MaxLength="10" onKeydown="CaptureKey(event)" OnTextChanged="txtVoucherNo_TextChanged"></asp:TextBox>

in the keydown event

function CaptureKey(evt)
{
   if(evt.keyCode==117){
__doPostBack('', 'F6keypress');
}
}

it will call the Server side method
so u need to write the serverside like this

protected void Page_Load(object sender, EventArgs e)
    {
     if (Page.IsPostBack)
            {
                   CalltheMeothds();
                  // Do what ever u like to do here 
             }
}

It should work
may be it will help to u
ALL The BEST

CHAKRI(*_*)

Edited by mike_2000_17: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.