473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Easy Question

I have a template for a datagrid that I need to contain a hyperlink and
populate the url string with data from a DB. I have the following code below
which seems to be fine but can't open the design tool from html view because
of a message stating i need to have '' around the data item.

Code:

<asp:TemplateColumn>
<ItemTemplate>
<a href='javascript:void'
onclick=window.open('Amortize/?N=<%# databinder.eval(Container.dataitem,"N")
%>&I=<%# databinder.eval(Container.dataitem,"I") %>&PV=<%#
databinder.eval(Container.dataitem,"PV")
%>','mywin','left=20,top=20,width=500,height=500,t oolbar=1,resizable=0)'>View
Amortization</a>
</ItemTemplate>
</asp:TemplateColumn>

Can you see anything that I need to change?
Nov 19 '05 #1
3 1484
Dont see anything obvious...
Just put it in, piece by piece, and view source on it... you'll see the
syntax generated then.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Ryan Smith" wrote:
I have a template for a datagrid that I need to contain a hyperlink and
populate the url string with data from a DB. I have the following code below
which seems to be fine but can't open the design tool from html view because
of a message stating i need to have '' around the data item.

Code:

<asp:TemplateColumn>
<ItemTemplate>
<a href='javascript:void'
onclick=window.open('Amortize/?N=<%# databinder.eval(Container.dataitem,"N")
%>&I=<%# databinder.eval(Container.dataitem,"I") %>&PV=<%#
databinder.eval(Container.dataitem,"PV")
%>','mywin','left=20,top=20,width=500,height=500,t oolbar=1,resizable=0)'>View
Amortization</a>
</ItemTemplate>
</asp:TemplateColumn>

Can you see anything that I need to change?

Nov 19 '05 #2
Thanks Curt - I have done that and have copied code from another project and
it keeps blowing up. If this code is on the page the codebehind code does
not work either which is odd - even after i remove the code the codebehind
code does ont work until i click on each element which i guess reinitiates
the code behind to the objet. Weird...

"Curt_C [MVP]" wrote:
Dont see anything obvious...
Just put it in, piece by piece, and view source on it... you'll see the
syntax generated then.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Ryan Smith" wrote:
I have a template for a datagrid that I need to contain a hyperlink and
populate the url string with data from a DB. I have the following code below
which seems to be fine but can't open the design tool from html view because
of a message stating i need to have '' around the data item.

Code:

<asp:TemplateColumn>
<ItemTemplate>
<a href='javascript:void'
onclick=window.open('Amortize/?N=<%# databinder.eval(Container.dataitem,"N")
%>&I=<%# databinder.eval(Container.dataitem,"I") %>&PV=<%#
databinder.eval(Container.dataitem,"PV")
%>','mywin','left=20,top=20,width=500,height=500,t oolbar=1,resizable=0)'>View
Amortization</a>
</ItemTemplate>
</asp:TemplateColumn>

Can you see anything that I need to change?

Nov 19 '05 #3
I remember encountering this problem, too. (Maybe a year ago..) I think I
came to the conclusion that it was due to the "mixture" of single and double
quotes in the aspx page.

"Ryan Smith" wrote:
Thanks Curt - I have done that and have copied code from another project and
it keeps blowing up. If this code is on the page the codebehind code does
not work either which is odd - even after i remove the code the codebehind
code does ont work until i click on each element which i guess reinitiates
the code behind to the objet. Weird...

"Curt_C [MVP]" wrote:
Dont see anything obvious...
Just put it in, piece by piece, and view source on it... you'll see the
syntax generated then.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Ryan Smith" wrote:
I have a template for a datagrid that I need to contain a hyperlink and
populate the url string with data from a DB. I have the following code below
which seems to be fine but can't open the design tool from html view because
of a message stating i need to have '' around the data item.

Code:

<asp:TemplateColumn>
<ItemTemplate>
<a href='javascript:void'
onclick=window.open('Amortize/?N=<%# databinder.eval(Container.dataitem,"N")
%>&I=<%# databinder.eval(Container.dataitem,"I") %>&PV=<%#
databinder.eval(Container.dataitem,"PV")
%>','mywin','left=20,top=20,width=500,height=500,t oolbar=1,resizable=0)'>View
Amortization</a>
</ItemTemplate>
</asp:TemplateColumn>

Can you see anything that I need to change?

Nov 19 '05 #4

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

Similar topics

1
by: rdsteph | last post by:
I am having a lot of fun using the pyGoogle module ( http://pygoogle.sourceforge.net/ ) that uses the Google API. It is about as easy to use as I can imagine, and it is a lot nicer than using my...
5
by: LedZep | last post by:
What up, All I need to do is enter a last name in a text box, query a MSAccess database and display the name with the corresponding columns. This is no problem, but when there are more than one...
13
by: Ghislain Tanguay | last post by:
I have a compiled vb.net app and I want to give the user a choice to launch it from the start line command and pass it a parameter or not. How can I do that in my code? Is it possible? Ex. :...
1
by: melanieab | last post by:
Hi, If there's a textbox and the text entered is longer than what's visible (the textbox length), how do you make it so that the beginning chunk of text is visible (instead of the last part of...
6
by: Martin Bootsma | last post by:
I have a C question, which looks very easy, but no one here seems to know an easy answer. I have a function "powell" (from Numerical Recipes) which takes an argument of the type "double...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.