Click here to Skip to main content
15,885,546 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: A few points to consider while working with literal string in ASP.NET Pin
Afzaal Ahmad Zeeshan2-Mar-15 3:03
professionalAfzaal Ahmad Zeeshan2-Mar-15 3:03 
Questionopen project mvc Pin
Nguyen Jay27-Feb-15 16:55
Nguyen Jay27-Feb-15 16:55 
AnswerRe: open project mvc Pin
Afzaal Ahmad Zeeshan28-Feb-15 3:24
professionalAfzaal Ahmad Zeeshan28-Feb-15 3:24 
Questionneed help to add paging in datalist access db with vb code Pin
Member 1148584027-Feb-15 8:46
Member 1148584027-Feb-15 8:46 
SuggestionRe: need help to add paging in datalist access db with vb code Pin
Richard Deeming27-Feb-15 10:31
mveRichard Deeming27-Feb-15 10:31 
Questionvb function / sub call using javascript . Pin
Member 815140727-Feb-15 8:13
Member 815140727-Feb-15 8:13 
AnswerRe: vb function / sub call using javascript . Pin
ZurdoDev27-Feb-15 9:35
professionalZurdoDev27-Feb-15 9:35 
Question"End of statement Expected" error Pin
samflex27-Feb-15 5:11
samflex27-Feb-15 5:11 
I have several fieldnames from the database, one form field from markup called ddlPartySize.SelectedValue and one variable from codebehind.

I am trying to form a hyperlink on code behind but getting End of Statement Expected error message.

Any ideas how to resolve this?

Thanks in advance:

PHP
Private Sub gvCustomers_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvCustomers.RowDataBound
    If e.Row.RowType = DataControlRowType.DataRow Then
        Dim hl As HyperLink = CType(e.Row.FindControl("hdReserve"), HyperLink)
        If hl IsNot Nothing Then
            hl.NavigateUrl = "<%# String.Format("ReserveFacility.aspx?id={0}&groupsize={1}&facilityFees={2}&depoitAmt={3}&cancelAmt={4}&keydeptAmt={5}&extrahour={6}&hoursdiff={7}", CType(Container.DataItem, System.Data.DataRowView)("siteId") , ddlPartySize.SelectedValue,CType(Container.DataItem, System.Data.DataRowView)("RentalFeeAmount"),CType(Container.DataItem, System.Data.DataRowView)("DepositAmount"),CType(Container.DataItem, System.Data.DataRowView)("CancellationAmount"),CType(Container.DataItem, System.Data.DataRowView)("DepositAmount"),CType(Container.DataItem, System.Data.DataRowView)("ExtraHourAmount"),hourDiff %>"
        End If
    End If
End Sub


I use the code on markup below, it works except hourDiff from ValidateDuration sub on codebehind.
PHP
 <asp:TemplateField HeaderText="Select" SortExpression="siteid">
  <ItemTemplate>
      <asp:HyperLink ID="hdReserve" class="js_siteid"  AutoPostBack="false" runat="server" Text="Select"
        Navigateurl='<%# String.Format("ReserveFacility.aspx?id={0}&groupsize={1}&facilityFees={2}&depoitAmt={3}&cancelAmt={4}&keydeptAmt={5}&extrahour={6}", CType(Container.DataItem, System.Data.DataRowView)("siteId") , ddlPartySize.SelectedValue,CType(Container.DataItem, System.Data.DataRowView)("RentalFeeAmount"),CType(Container.DataItem, System.Data.DataRowView)("DepositAmount"),CType(Container.DataItem, System.Data.DataRowView)("CancellationAmount"),CType(Container.DataItem, System.Data.DataRowView)("DepositAmount"),CType(Container.DataItem, System.Data.DataRowView)("ExtraHourAmount")) %>' />
  </ItemTemplate>
</asp:TemplateField>

AnswerRe: "End of statement Expected" error Pin
PIEBALDconsult27-Feb-15 5:25
mvePIEBALDconsult27-Feb-15 5:25 
AnswerRe: "End of statement Expected" error Pin
Richard Deeming27-Feb-15 6:28
mveRichard Deeming27-Feb-15 6:28 
GeneralRe: "End of statement Expected" error Pin
samflex27-Feb-15 6:40
samflex27-Feb-15 6:40 
GeneralRe: "End of statement Expected" error Pin
Richard Deeming27-Feb-15 8:04
mveRichard Deeming27-Feb-15 8:04 
GeneralRe: "End of statement Expected" error Pin
samflex27-Feb-15 9:03
samflex27-Feb-15 9:03 
GeneralRe: "End of statement Expected" error Pin
Richard Deeming27-Feb-15 10:29
mveRichard Deeming27-Feb-15 10:29 
GeneralRe: "End of statement Expected" error Pin
samflex27-Feb-15 10:44
samflex27-Feb-15 10:44 
GeneralRe: "End of statement Expected" error Pin
Richard Deeming2-Mar-15 1:43
mveRichard Deeming2-Mar-15 1:43 
GeneralRe: "End of statement Expected" error Pin
samflex2-Mar-15 4:04
samflex2-Mar-15 4:04 
GeneralRe: "End of statement Expected" error Pin
Richard Deeming2-Mar-15 7:10
mveRichard Deeming2-Mar-15 7:10 
GeneralRe: "End of statement Expected" error Pin
samflex2-Mar-15 14:55
samflex2-Mar-15 14:55 
QuestionJSON Hijacking and ASP.Net MVC Pin
Tridip Bhattacharjee27-Feb-15 1:55
professionalTridip Bhattacharjee27-Feb-15 1:55 
AnswerRe: JSON Hijacking and ASP.Net MVC Pin
Richard MacCutchan27-Feb-15 3:00
mveRichard MacCutchan27-Feb-15 3:00 
QuestionWeb site various attack and security Pin
Tridip Bhattacharjee26-Feb-15 23:55
professionalTridip Bhattacharjee26-Feb-15 23:55 
AnswerRe: Web site various attack and security Pin
Richard Deeming27-Feb-15 1:26
mveRichard Deeming27-Feb-15 1:26 
QuestionRe: Access from data from Ms access Pin
Praveen Kandari26-Feb-15 1:16
Praveen Kandari26-Feb-15 1:16 
AnswerRe: Access from data from Ms access Pin
Richard MacCutchan26-Feb-15 2:00
mveRichard MacCutchan26-Feb-15 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.