Hi,
I've designed an web custom control. Small problem in that control. That is, i
want the page number should increment by one for every click event of the
control. But that control dosen't work like that. please could you able to
correct it.
Thank you,
kumar
Note: Here i listed my code.
Imports System.ComponentModel
Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Drawing
Imports System.Drawing.Color
Imports System.Collections.Specialized
Namespace GraphicalUtility
<DefaultProperty("PageUrl"), ToolboxData("<{0}:PageLinkNavigation
runat=server></{0}:PageLinkNavigation>")> Public Class PageLinkNavigation
Inherits Control
Implements INamingContainer
<Bindable(True), Category("Data"), DefaultValue(1)> Property [PageNo]() As
Integer
Get
Dim o As Object = ViewState("_PageNo")
If o Is Nothing Then
Return 1
Else
Return CInt(ViewState("_PageNo"))
End If
End Get
Set(ByVal strValue As Integer)
ViewState("_PageNo") = strValue
End Set
End Property
Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
End Sub
Protected Sub OnNext(ByVal sender As Object, ByVal e As EventArgs)
Dim tmpStr As String
tmpstr = "Testform.aspx?page=" + PageNo.ToString()
PageNo = PageNo + 1
Page.Response.Redirect(tmpstr)
End Sub
Public Event PageChanged As EventHandler
Protected Overrides Sub CreateChildControls()
Dim lbtnNext As LinkButton
lbtnNext = New LinkButton()
lbtnNext.Text = "First"
Controls.Add(lbtnNext)
AddHandler lbtnNext.Click, AddressOf OnNext
End Sub
End Class
End Namespace
---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! � Try it today!
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/