473,480 Members | 3,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 750

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

Similar topics

5
4060
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
1673
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
3911
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
1978
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
2668
by: edurazee | last post by:
I am able to create BoundFields and Footer-rows dynamically like this in my GridView: protected void Page_Load(object sender, EventArgs e) { CreateGridView(); ...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
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
7106
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
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3013
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.