Click here to Skip to main content
15,885,920 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how can add javascript code ?? Pin
Nitin S9-May-11 19:19
professionalNitin S9-May-11 19:19 
GeneralRe: how can add javascript code ?? Pin
lolostar9-May-11 20:10
lolostar9-May-11 20:10 
GeneralRe: how can add javascript code ?? Pin
Nitin S9-May-11 20:13
professionalNitin S9-May-11 20:13 
GeneralRe: how can add javascript code ?? Pin
Ali Al Omairi(Abu AlHassan)9-May-11 22:08
professionalAli Al Omairi(Abu AlHassan)9-May-11 22:08 
AnswerRe: how can add javascript code ?? Pin
Prasanta_Prince9-May-11 21:03
Prasanta_Prince9-May-11 21:03 
QuestionDatabase audit/journaling Pin
vanikanc9-May-11 8:09
vanikanc9-May-11 8:09 
AnswerRe: Database audit/journaling Pin
Ennis Ray Lynch, Jr.9-May-11 8:21
Ennis Ray Lynch, Jr.9-May-11 8:21 
QuestionASP & JavaScript Pin
future38397-May-11 1:56
future38397-May-11 1:56 
AnswerRe: ASP & JavaScript Pin
Luc Pattyn7-May-11 2:20
sitebuilderLuc Pattyn7-May-11 2:20 
AnswerRe: ASP & JavaScript Pin
keyur satyadev7-May-11 2:40
keyur satyadev7-May-11 2:40 
Questionregular expression Pin
fififlowertot5-May-11 23:00
fififlowertot5-May-11 23:00 
AnswerRe: regular expression Pin
Sneha Bisht5-May-11 23:38
Sneha Bisht5-May-11 23:38 
GeneralRe: regular expression Pin
Sneha Bisht5-May-11 23:45
Sneha Bisht5-May-11 23:45 
AnswerRe: regular expression Pin
Ravi Sant6-May-11 1:03
Ravi Sant6-May-11 1:03 
AnswerRe: regular expression Pin
AspDotNetDev6-May-11 7:47
protectorAspDotNetDev6-May-11 7:47 
QuestionAjaxControlToolkit behaviour Pin
vanikanc5-May-11 10:39
vanikanc5-May-11 10:39 
AnswerRe: AjaxControlToolkit behaviour Pin
Prasanta_Prince6-May-11 7:14
Prasanta_Prince6-May-11 7:14 
GeneralRe: AjaxControlToolkit behaviour Pin
vanikanc6-May-11 10:45
vanikanc6-May-11 10:45 
GeneralRe: AjaxControlToolkit behaviour Pin
Herman<T>.Instance17-May-11 4:43
Herman<T>.Instance17-May-11 4:43 
Questionvalidate textbox Pin
jashimu5-May-11 4:24
jashimu5-May-11 4:24 
AnswerRe: validate textbox Pin
Not Active5-May-11 4:51
mentorNot Active5-May-11 4:51 
AnswerRe: validate textbox Pin
Prasanta_Prince5-May-11 5:02
Prasanta_Prince5-May-11 5:02 
GeneralRe: validate textbox Pin
jashimu5-May-11 7:49
jashimu5-May-11 7:49 
GeneralRe: validate textbox Pin
AspDotNetDev5-May-11 8:25
protectorAspDotNetDev5-May-11 8:25 
QuestionGridView Paging Pin
fififlowertot4-May-11 23:06
fififlowertot4-May-11 23:06 
Hi,
I have a grid which is bound to data coming from a service at runtime.
The issue is every time i select next page number the page goes blank.

My code is as follows: for grid in aspx

<div>
        <asp:Label ID="Label1" runat="server" Text="Searching....." Font-Bold = "true"></asp:Label>
        <asp:GridView ID="grid1" runat="server" OnPageIndexChanging= "grid1_PageIndexChanged" 
            AutoGenerateColumns="False" Enabled ="false" AllowPaging="True" PageSize="5">
        <Columns>
       <asp:BoundField  DataField = "Name"/>
       <asp:BoundField  DataField = "ID"/>
      </Columns></asp:GridView>
        
            </div>


the codebehind(.cs) is typically is as follows:
on pageload:

grid1.Enabled = true;
                    DataTable dt = new DataTable();
                    dt.Columns.Add("Name");
                    dt.Columns.Add("ID");
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2); 
                    dt.Rows.Add("Jack", 1);
                    dt.Rows.Add("Jill", 2);
                   grid1.DataSource = dt;
                   grid1.DataBind();  


protected void grid1_PageIndexChanged(Object sender, GridViewPageEventArgs e)
    {
                
        grid1.PageIndex = e.NewPageIndex;
        grid1.DataBind();
    }


what am i missing here

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.