Click here to Skip to main content
15,922,533 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: add required validator to dynamically created textbox Pin
N a v a n e e t h9-Jul-08 1:01
N a v a n e e t h9-Jul-08 1:01 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee9-Jul-08 2:45
eyeseetee9-Jul-08 2:45 
GeneralRe: add required validator to dynamically created textbox Pin
Imran Khan Pathan9-Jul-08 3:03
Imran Khan Pathan9-Jul-08 3:03 
GeneralRe: add required validator to dynamically created textbox Pin
eyeseetee9-Jul-08 3:09
eyeseetee9-Jul-08 3:09 
GeneralRe: add required validator to dynamically created textbox Pin
Imran Khan Pathan9-Jul-08 3:21
Imran Khan Pathan9-Jul-08 3:21 
Questionrepeating rows in datalist while i click 2nd or 3rd page navigation. Pin
subbu.sk8-Jul-08 22:30
subbu.sk8-Jul-08 22:30 
AnswerRe: repeating rows in datalist while i click 2nd or 3rd page navigation. Pin
eyeseetee8-Jul-08 22:39
eyeseetee8-Jul-08 22:39 
GeneralRe: repeating rows in datalist while i click 2nd or 3rd page navigation. Pin
subbu.sk8-Jul-08 23:07
subbu.sk8-Jul-08 23:07 
hi.. thanks for ur immediate reply..

pls check this

  • oncommand=NavigatePage


    Protected Sub NavigatePage(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
    Select Case e.CommandName
    Case "PageNumber"
    fintCurrentPage = Convert.ToInt32(e.CommandArgument)

    Dim strselection As String = ""
    strselection = SearchString
    If SearchRange.Length > 0 And strselection.Length > 0 Then
    strselection = strselection & " and " & SearchRange
    ElseIf SearchRange.Length > 0 Then
    strselection = SearchRange
    End If

    dsPros = getProList(strselection, SortString, fintCurrentPage, PAGE_SIZE)
    Dim intNoOfRecs As Int32 = 0
    Dim intTotPages As Int32 = 0
    intNoOfRecs = CType(dsPros.Tables(1).Rows.Count, Int32)
    intTotPages = CType(dsPros.Tables(0).Rows(0).Item(0), Int32)

    FormatNavigationMenuBar(fintCurrentPage, intTotPages, PAGE_SIZE, RECS_IN_LIST)
    dtlstPros.DataSource = dsPros.Tables(1)
    dtlstPros.DataBind()
    dtlstPros.UpdateAfterCallBack = True

    '' lblListStatus.Text = "Displaying " & (((fintCurrentPage - 1) * PAGE_SIZE) + 1).ToString & " to " & ((fintCurrentPage - 1) * PAGE_SIZE) + intNoOfRecs.ToString & " of " & intTotPages.ToString & " matches"
    lblListStatus.UpdateAfterCallBack = True
    End Select
    End Sub



    Protected Function FormatNavigationMenuBar(ByVal CurrentPageNo As Integer, ByVal TotalNoOfRecords As Integer, _
    ByVal MaxNoOfProductsOnAPage As Integer, ByVal ForwardNumber As Integer) As String

    Dim intStartPageNo As Integer
    Dim intPageCounter As Integer
    Dim MaxNoOfBrowseToPageLinksOnAPage As Int32

    MaxNoOfBrowseToPageLinksOnAPage = ForwardNumber
    Dim intTotalPages As Integer
    Dim objdtPageLink As New DataTable("PageLink ")
    Dim drPageLink As DataRow
    With objdtPageLink.Columns
    .Add("PageNumber", System.Type.GetType("System.String"))
    .Add("PageID", System.Type.GetType("System.String"))
    End With


    'Compute Total No. of Pages
    intTotalPages = CInt(Math.Ceiling(TotalNoOfRecords / MaxNoOfProductsOnAPage))


    '>> Finding Starting of series
    If (CurrentPageNo Mod MaxNoOfBrowseToPageLinksOnAPage) = 0 Then
    intStartPageNo = (CurrentPageNo + 1) - MaxNoOfBrowseToPageLinksOnAPage
    Else
    intStartPageNo = (CurrentPageNo - (CurrentPageNo Mod MaxNoOfBrowseToPageLinksOnAPage))
    If intStartPageNo = 0 Then
    intStartPageNo = 1
    Else
    intStartPageNo += 1
    End If
    End If
    '<<

    '>> Form Move Previous link
    If Not CurrentPageNo = 1 Then
    imgbtnTopMovePrev.ImageUrl = strZoominImgServer + "/images/Pro/Prev_Page.gif"
    imgbtnTopMovePrev.CommandArgument = (CurrentPageNo - 1).ToString
    imgbtnTopMovePrev.Visible = True
    Else
    imgbtnTopMovePrev.Visible = False
    End If
    '<<
    '>> Form Move Previous n Pages link
    If intStartPageNo > 1 Then
    'imgbtnTopMoveFirst.ImageUrl = "~/images/Pro/Firstpage.gif"
    lnkbtnTopMoveFirst.CommandArgument = (intStartPageNo - MaxNoOfBrowseToPageLinksOnAPage).ToString
    lnkbtnTopMoveFirst.Visible = True
    panTopMoveFirst.Visible = True
    Else
    lnkbtnTopMoveFirst.Visible = False
    panTopMoveFirst.Visible = False
    'drPageLink = objdtPageLink.NewRow
    'drPageLink(0) = "&lt;&lt;"
    'drPageLink(1) = (intStartPageNo - MaxNoOfBrowseToPageLinksOnAPage).ToString
    'objdtPageLink.Rows.Add(drPageLink)
    'objdtPageLink.AcceptChanges()
    End If

    '>> Form Page Links
    For intPageCounter = intStartPageNo To (intStartPageNo + MaxNoOfBrowseToPageLinksOnAPage) - 1
    If intPageCounter > intTotalPages Then Exit For
    drPageLink = objdtPageLink.NewRow
    drPageLink(0) = intPageCounter.ToString
    drPageLink(1) = intPageCounter.ToString
    objdtPageLink.Rows.Add(drPageLink)
    objdtPageLink.AcceptChanges()
    Next
    '<<

    '>> Form Move Next n Pages link
    If (intStartPageNo + MaxNoOfBrowseToPageLinksOnAPage) <= intTotalPages Then
    'imgbtnTopMoveLast.ImageUrl = "~/images/Pro/lastpage.gif"
    lnkbtnTopMoveLast.CommandArgument = (intStartPageNo + MaxNoOfBrowseToPageLinksOnAPage).ToString
    lnkbtnTopMoveLast.Visible = True
    panTopMoveLast.Visible = True
    Else
    lnkbtnTopMoveLast.Visible = False
    panTopMoveLast.Visible = False
    'drPageLink = objdtPageLink.NewRow
    'drPageLink(0) = "&gt;&gt;"
    'drPageLink(1) = (intStartPageNo + MaxNoOfBrowseToPageLinksOnAPage).ToString
    'objdtPageLink.Rows.Add(drPageLink)
    'objdtPageLink.AcceptChanges()
    End If
    '<<
    '>> Form Move Next link
    'If Not (CurrentPageNo = intTotalPages) Then
    If (CurrentPageNo < intTotalPages) Then

    imgbtnTopMoveNext.ImageUrl = strZoominImgServer + "/images/Pro/Next_Page.gif"
    imgbtnTopMoveNext.CommandArgument = (CurrentPageNo + 1).ToString
    imgbtnTopMoveNext.Visible = True

    Else
    imgbtnTopMoveNext.Visible = False

    End If
    '<<

    If objdtPageLink.Rows.Count = 0 Then
    drPageLink = objdtPageLink.NewRow
    drPageLink(0) = 1
    drPageLink(1) = 1
    objdtPageLink.Rows.Add(drPageLink)
    objdtPageLink.AcceptChanges()
    End If

    dtlstTopNavigation.DataSource = objdtPageLink

    dtlstTopNavigation.DataBind()
    dtlstTopNavigation.UpdateAfterCallBack = True
    imgbtnTopMoveNext.UpdateAfterCallBack = True
    imgbtnTopMovePrev.UpdateAfterCallBack = True
    lnkbtnTopMoveFirst.UpdateAfterCallBack = True
    panTopMoveFirst.UpdateAfterCallBack = True
    panTopMoveLast.UpdateAfterCallBack = True
    lnkbtnTopMoveLast.UpdateAfterCallBack = True
    TotalProsListed = TotalNoOfRecords
    Return ""

    End Function

    #End Region






  • Thanks
    Subbu.

    QuestionBinding Gridview with Third Normal from database Pin
    Bharani_Ram8-Jul-08 21:57
    Bharani_Ram8-Jul-08 21:57 
    AnswerRe: Binding Gridview with Third Normal from database Pin
    Sherin Iranimose8-Jul-08 22:50
    Sherin Iranimose8-Jul-08 22:50 
    AnswerRe: Binding Gridview with Third Normal from database Pin
    Gayani Devapriya9-Jul-08 18:53
    Gayani Devapriya9-Jul-08 18:53 
    Questionsearching data from one form and displaying to another form Pin
    Mamphekgo Bahula8-Jul-08 21:57
    Mamphekgo Bahula8-Jul-08 21:57 
    AnswerRe: searching data from one form and displaying to another form Pin
    eyeseetee8-Jul-08 22:18
    eyeseetee8-Jul-08 22:18 
    QuestionSelecting a dropdownlist value in gridview edit mode [modified] Pin
    Brendan Vogt8-Jul-08 21:47
    Brendan Vogt8-Jul-08 21:47 
    AnswerRe: Selecting a dropdownlist value in gridview edit mode Pin
    eyeseetee8-Jul-08 22:34
    eyeseetee8-Jul-08 22:34 
    QuestionRe: Selecting a dropdownlist value in gridview edit mode Pin
    Brendan Vogt8-Jul-08 23:55
    Brendan Vogt8-Jul-08 23:55 
    AnswerRe: Selecting a dropdownlist value in gridview edit mode Pin
    eyeseetee8-Jul-08 23:59
    eyeseetee8-Jul-08 23:59 
    GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
    Brendan Vogt9-Jul-08 0:26
    Brendan Vogt9-Jul-08 0:26 
    GeneralRe: Selecting a dropdownlist value in gridview edit mode Pin
    eyeseetee9-Jul-08 0:38
    eyeseetee9-Jul-08 0:38 
    QuestionHow to make query string as read only. Pin
    BalasubramanianK8-Jul-08 21:40
    BalasubramanianK8-Jul-08 21:40 
    AnswerRe: How to make query string as read only. Pin
    eyeseetee8-Jul-08 22:22
    eyeseetee8-Jul-08 22:22 
    GeneralRe: How to make query string as read only. Pin
    BalasubramanianK8-Jul-08 22:35
    BalasubramanianK8-Jul-08 22:35 
    GeneralRe: How to make query string as read only. Pin
    BalasubramanianK8-Jul-08 22:51
    BalasubramanianK8-Jul-08 22:51 
    GeneralRe: How to make query string as read only. Pin
    eyeseetee8-Jul-08 22:54
    eyeseetee8-Jul-08 22:54 
    AnswerRe: How to make query string as read only. Pin
    N a v a n e e t h8-Jul-08 23:05
    N a v a n e e t h8-Jul-08 23:05 

    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.