Not sure what I am doing wrong here.
<
telerik:RadPanelItem
runat
=
"server"
Font-Bold
=
"True"
ForeColor
=
"White"
NavigateUrl="https://site.com/app/default.asp?
M
=
2
-3&u=<%= uUser_id%>"
Text="Event Application">
</
telerik:RadPanelItem
>
Trying to pass the current user ID but I pass:
https://site.com/app/default.asp?M=2-3&u=<;%= uUser_id%>
instead of:
Any ideas?
ASP programer learning ASPX
6 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 22 Sep 2010, 12:57 PM
Hello,
I believe setting the NavigateUrl from code behind is better option than setting it from aspx. Access the PanelItem using FindItemByText/FindItemByUrl/FindItemByValue method and set the NavigateUrl and url parameter.
-Shinu.
I believe setting the NavigateUrl from code behind is better option than setting it from aspx. Access the PanelItem using FindItemByText/FindItemByUrl/FindItemByValue method and set the NavigateUrl and url parameter.
-Shinu.
0

Cori
Top achievements
Rank 2
answered on 22 Sep 2010, 03:43 PM
Hello Kris,
You can set it like this instead:
NavigateUrl="<%# String.Format("https://site.com/app/default.asp?M=2-3&u={0}", uUser_id)%>"
I hope that helps.
You can set it like this instead:
NavigateUrl="<%# String.Format("https://site.com/app/default.asp?M=2-3&u={0}", uUser_id)%>"
I hope that helps.
0

Kris
Top achievements
Rank 1
answered on 23 Sep 2010, 02:05 PM
This is what I ended up doing. But now the menu is doubled.
So the next question why is it doubled?
ascx code
<%@ Control language="vb" Inherits="dotnetnuke.aau.aauplaymenu.View" AutoEventWireup="false" Explicit="True" Codebehind="View.ascx.vb" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<
link
href
=
"module.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
telerik:RadPanelBar
runat
=
"server"
ID
=
"RadPanelBar1"
Skin
=
"Black"
Width
=
"228px"
ExpandMode
=
"SingleExpandedItem"
>
</
telerik:RadPanelBar
>
ascx.vb Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
Try
If Not Page.IsPostBack Then
ReadRecordAndSetupPage()
End If
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
Protected Sub ReadRecordAndSetupPage()
uUser_id = getuUser_id()
Dim RT_Home As New RadPanelItem()
RT_Home.Text = "Home - Summary Page"
RT_Home.ForeColor = Color.GreenYellow
RT_Home.Font.Bold = True
RT_Home.NavigateUrl = "~/home.aspx"
RadPanelBar1.Items.Add(RT_Home)
Dim RT_Athlete As New RadPanelItem()
RT_Athlete.Text = "Athlete Application"
RT_Athlete.ForeColor = Color.GreenYellow
RT_Athlete.Font.Bold = True
RT_Athlete.NavigateUrl = "~/Athlete.aspx?sCat=A"
RadPanelBar1.Items.Add(RT_Athlete)
...
End Sub
0
Hi Kris,
Could you, please, specify what exactly do you mean by "
Please, try to specify the problem you currently experience and I will do my best to resolve it!
Hope that soon we will solve this!
Regards,
Nikolay Tsenkov
the Telerik team
Could you, please, specify what exactly do you mean by "
the menu is doubled
"?Please, try to specify the problem you currently experience and I will do my best to resolve it!
Hope that soon we will solve this!
Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0

Kris
Top achievements
Rank 1
answered on 27 Sep 2010, 02:26 PM
What I mean is that the menu repeats it's self.
0
Hi Kris,
Your user control is the menu, I saw that just now. Sorry about that! Whenever I read "menu", I think about RadMenu control.
Now, on the problem:
- If the user control is being doubled on the page you declare it, then probably it's being instantiated a second time later on the page lifecycle. Could you, please, open a support ticket and provide me with a runnable project? This will save a lot of time in correspondence and will contribute to solving this problem faster.
Hope that soon you will submit the ticket and I will have a sample project to debug!
Regards,
Nikolay Tsenkov
the Telerik team
Your user control is the menu, I saw that just now. Sorry about that! Whenever I read "menu", I think about RadMenu control.
Now, on the problem:
- If the user control is being doubled on the page you declare it, then probably it's being instantiated a second time later on the page lifecycle. Could you, please, open a support ticket and provide me with a runnable project? This will save a lot of time in correspondence and will contribute to solving this problem faster.
Hope that soon you will submit the ticket and I will have a sample project to debug!
Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items