I have multiple ajax panels on my page. I tried to configure it to update an asp label and to also show a tool tip on an image button click within a repeater. However, when I click the image, nothing on the front end get's updated. My code does run, I have verfied because the database get's updated. Can anyone tell me what I'm doing wrong?
And here is the code behind
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"updateDate"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"headerOutput"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"myOutput"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"headRepeat"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"userInfoOutput"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"userBlockChart"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"output"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel2"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadToolTip
ID
=
"headerOutput"
Skin
=
"Windows7"
Position
=
"Center"
runat
=
"server"
CssClass
=
"headerTooltip"
Height
=
"60"
Width
=
"220"
AutoCloseDelay
=
"4000"
></
telerik:RadToolTip
>
<
asp:Label
ID
=
"myOutput"
runat
=
"server"
></
asp:Label
>
<
br
/>
<
asp:Repeater
ID
=
"headRepeat"
runat
=
"server"
>
<
ItemTemplate
>
<
div
class
=
"headerImageRepeat"
id
=
"headerDiv"
runat
=
"server"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
style
=
"height: 70px;"
>
<
tr
>
<
td
style
=
"padding-left: 10px; padding-top: 5px; padding-right: 10px;"
valign
=
"top"
>
<
asp:ImageButton
ID
=
"headerImage"
runat
=
"server"
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "headerImageUrl") %>'
CommandName="showUsers" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
</
td
>
<
td
style
=
"padding-bottom: 5px; padding-top: 5px;"
valign
=
"bottom"
>
<
asp:Label
ID
=
"memberName"
runat
=
"server"
Text='<%# DataBinder.Eval(Container.DataItem, "memberNameOutput") %>'></
asp:Label
><
br
/>
<
span
class
=
"headerGoal"
><
asp:Label
ID
=
"memberHours"
runat
=
"server"
Text='<%# DataBinder.Eval(Container.DataItem, "memberHoursOutput") %>'></
asp:Label
> hours per day</
span
><
br
/>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
border
=
"0"
><
tr
><
td
valign
=
"middle"
class
=
"headerGoal"
>
Goal: <
asp:textbox
CssClass
=
"goalTextbox"
ID
=
"goalInput"
runat
=
"server"
Text='<%# DataBinder.Eval(Container.DataItem, "memberGoalOutput") %>' Width="40px"></
asp:textbox
>
</
td
><
td
valign
=
"top"
class
=
"headerGoal"
><
asp:ImageButton
ID
=
"ImageButton1"
runat
=
"server"
ImageUrl
=
"../images/save.png"
CommandName
=
"updateHours"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
</
td
></
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
ItemTemplate
>
</
asp:Repeater
>
</
telerik:RadAjaxPanel
>
And here is the code behind
'they clicked the save button in header for goal hours
Private
Sub
headRepeat_ItemCommand(
ByVal
source
As
Object
,
ByVal
e
As
System.Web.UI.WebControls.RepeaterCommandEventArgs)
Handles
headRepeat.ItemCommand
If
(e.CommandName.ToString =
"showUser"
)
Then
'*************************************************************
'*************************************************************
'*************************************************************
'this is not getting updated
userInfoOutput.Text =
"test"
End
If
'if e.commandNmae = showUser
'if they clicked the save in the repeater
If
(e.CommandName.ToString =
"updateHours"
)
Then
Dim
memberId = e.CommandArgument.ToString
Dim
currentUser = Membership.GetUser.ProviderUserKey.ToString
Dim
hoursTextbox = TryCast(e.Item.FindControl(
"goalInput"
), TextBox)
Dim
hoursInput = hoursTextbox.Text
'check if we have a number otherwise we tell them we need a number
If
(IsNumeric(hoursInput))
Then
Dim
sql =
"SELECT * FROM MemberGoal WHERE memberId = '"
& memberId &
"' AND webUserId = '"
& currentUser &
"'"
'if this has a row then we update, otherwise we insert
If
(awesome.checkRecord(sql, dashConn))
Then
sql =
"UPDATE MemberGoal SET hourGoal = "
& hoursInput &
" WHERE memberId = '"
& memberId &
"' AND webUserId = '"
& currentUser &
"'"
Else
'we are inserting
sql =
"INSERT INTO MemberGoal(hourGoal, memberId, webUserId) VALUES("
& hoursInput &
", '"
& memberId &
"', '"
& currentUser &
"')"
End
If
'if
awesome.executeQuery(sql, dashConn)
'*************************************************************
'*************************************************************
'*************************************************************
'this is not getting updated
headerOutput.Text =
"<center style='padding-top: 20px;'>The hours were updated for the user</center>"
headerOutput.Show()
Else
'else we need to tell them we need a number
headerOutput.Text =
"<center style='padding-top: 20px;' class='errorText'>Please enter a number.</center>"
headerOutput.Show()
End
If
'if isnumeric
End
If
'if e.commandname
End
Sub