473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

User Control problem

hi i created a linkbutton with this code in html
<asp:linkbutton id="Nextbutton"
onclick="PagerButton_Click" runat="server" Text="[Next]"
CommandArgument="Next"></asp:linkbutton>
<asp:linkbutton id="Prevbutton"
onclick="PagerButton_Click" runat="server" Text="[Prev]"
CommandArgument="Prev"></asp:linkbutton>

and i have code behind like this

Sub PagerButtonClick(ByVal sender As Object, ByVal e As
EventArgs)
Dim arg As String = sender.CommandArgument
Select Case arg

Case "Next"
If (DataGrid1.CurrentPageIndex < (DataGrid1.PageCount -
1)) Then
DataGrid1.CurrentPageIndex += 1
End If
Case "Prev"
If (DataGrid1.CurrentPageIndex > 0) Then
DataGrid1.CurrentPageIndex -= 1
End If

End Select
End Sub

so basically when i run it in normal aspx file it will
work
they can read the commanArgument and the bottom written
javascript: _doPostBack('Next','')

BUT when i move to web user control which in ascx file it
didnt work
the web read the commandArgument in javascript:
_doPostBack('myUCP$Next','')

the myUCP is the name of my user control file which is
myUCP.ascx

the problem is i cannot use the commandArgument or in
other when the link is clicked it didnt trigger function
or carry the correct commandArgument

anyone can help?

THAX
Nov 19 '05 #1
0 988

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
4
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
0
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
5
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.