Click here to Skip to main content
15,910,773 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
C#
if (!Page.IsPostBack)
    {
        GetUserFriendsRequest(int.Parse(Request.QueryString["Id"].ToString()));
    }
}

public void GetUserFriendsRequest(int Id)
{
    string getFriendRequestQuery = "Select * FROM [User] where Id IN (SELECT MyId as Id FROM Friends WHERE FriendId='" + Id + "')";
    dt = dbClass.ConnectDataBaseReturnDT(getFriendRequestQuery);
    if (dt.Rows.Count > 0)
    {
        FreindRequestList.DataSource = dt;
        FreindRequestList.DataBind();
    }



i want explainnation of code what is meaning of if(!page.postBack)
[edit]Code block tidied, "Ignore HTML..." option disabled - OriginalGriff[/edit]
Posted
Updated 1-May-11 2:07am
v2
Comments
Smithers-Jones 1-May-11 8:38am    
FFS, you are here long enough and posted enough questions, to know the rules: First of all add a meaningful subject line. Stating "I want" is impolite and demanding, so maybe you wnat to change the tone of your voice. And like Griff mentioned below, use Google!
Sandeep Mewara 1-May-11 10:42am    
Lazy.
Sergey Alexandrovich Kryukov 1-May-11 18:21pm    
My 1. Tag it! ASP.NET? Give sensible title!
--SA

Ah Google! A remarkable tool, if you learn to use it! Or even, if you actually bother to use it...

Google found this as the top hit for "Page.IsPostBack": MSDN[^]
 
Share this answer
 
You'll get info here: what is page postback[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900