473,396 Members | 1,827 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,396 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 1485
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
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: 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.