R
Rob Meade
Hi all,
I am getting the above error when I try to flick from HTML to Design view in
Visual Studio - I get the jist of the error message, and I know the line of
code which it refers to which is this;
<asp:TemplateColumn>
<ItemTemplate>
<a class="normalText" href="javascript:void(0);"
onclick="populateForm('<%=Request.QueryString("controlid") %>', '<%#
DataBinder.Eval(Container.DataItem, "CrfExpansion") %> ','<%=("hid" &
Right(Request.QueryString("controlid"),
Len(Request.QueryString("controlid"))-3)) & "Code"%>', '<%#
DataBinder.Eval(Container.DataItem, "CrfDHANationalCode") %>');">Select</a>
</ItemTemplate>
</asp:TemplateColumn>
As you can see theres a good mixture of crap in there! It's the onClick
event that I believe is the problem - which reads:
onclick="populateForm
(
'<%=Request.QueryString("controlid") %>',
'<%# DataBinder.Eval(Container.DataItem, "CrfExpansion") %> ',
'<%=("hid" & Right(Request.QueryString("controlid"),
Len(Request.QueryString("controlid"))-3)) & "Code"%>',
'<%# DataBinder.Eval(Container.DataItem, "CrfDHANationalCode") %>'
)
if we break it open...Can anyone suggest how this might be changed to allow
me to flick back and forth again, I had assumed that I would need the single
quotes ( ' ) around the values that I'm sending the javascript function,
incase for example there was a comma ( , ) in the values coming through (for
whatever reason), and I'm used to having double quotes ( " ) in syntax such
as Request.QueryString("blah")
Whats most annoying is that until I flick back to Design view it wont add
any of the server controls I've typed in manually (well copied and pasted
and renamed) to the code behind view - and I dont fancy typing that little
lot in! )
Any suggestions appreciated.
Regards
Rob
I am getting the above error when I try to flick from HTML to Design view in
Visual Studio - I get the jist of the error message, and I know the line of
code which it refers to which is this;
<asp:TemplateColumn>
<ItemTemplate>
<a class="normalText" href="javascript:void(0);"
onclick="populateForm('<%=Request.QueryString("controlid") %>', '<%#
DataBinder.Eval(Container.DataItem, "CrfExpansion") %> ','<%=("hid" &
Right(Request.QueryString("controlid"),
Len(Request.QueryString("controlid"))-3)) & "Code"%>', '<%#
DataBinder.Eval(Container.DataItem, "CrfDHANationalCode") %>');">Select</a>
</ItemTemplate>
</asp:TemplateColumn>
As you can see theres a good mixture of crap in there! It's the onClick
event that I believe is the problem - which reads:
onclick="populateForm
(
'<%=Request.QueryString("controlid") %>',
'<%# DataBinder.Eval(Container.DataItem, "CrfExpansion") %> ',
'<%=("hid" & Right(Request.QueryString("controlid"),
Len(Request.QueryString("controlid"))-3)) & "Code"%>',
'<%# DataBinder.Eval(Container.DataItem, "CrfDHANationalCode") %>'
)
if we break it open...Can anyone suggest how this might be changed to allow
me to flick back and forth again, I had assumed that I would need the single
quotes ( ' ) around the values that I'm sending the javascript function,
incase for example there was a comma ( , ) in the values coming through (for
whatever reason), and I'm used to having double quotes ( " ) in syntax such
as Request.QueryString("blah")
Whats most annoying is that until I flick back to Design view it wont add
any of the server controls I've typed in manually (well copied and pasted
and renamed) to the code behind view - and I dont fancy typing that little
lot in! )
Any suggestions appreciated.
Regards
Rob