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

Recommended Answers

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.

Jump to Post

All 2 Replies

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.

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(*_*)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.