I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=",
DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>'
target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this new
window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click",
"window.open("Product.aspx?id=", null,
"toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url I'm
going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this? 5 3269
Why not just do something like:
<a href="<%#"javascript :window.open('PDFReader.aspx?i d=" +
DataBinder.Eval(Container.DataItem, "ProductUniqueId") + "',null,
'toolbar=no,menubar=no,location=no');" %>">edit</a>
Karl
"George Durzi" <gd****@hotmail.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl... I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=", DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>' target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this new window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click", "window.open("Product.aspx?id=", null, "toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url I'm going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this?
(linkbutton)
repeater.findcontrol("lnkView").Attributes.Add("on click","window.open('Produ
ct.aspx?id=" + ProductUniqueId + "',
null,'toolbar=no,menubar=no,location=no')");
"George Durzi" <gd****@hotmail.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl... I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=", DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>' target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this new window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click", "window.open("Product.aspx?id=", null, "toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url I'm going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this?
Thanks Karl, I feel stupid not thinking of that. Don't know why I thought I
had to add an attribute to the LinkButton for its onclick.
"Karl" <none> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Why not just do something like: <a href="<%#"javascript:window.open('PDFReader.aspx?i d=" + DataBinder.Eval(Container.DataItem, "ProductUniqueId") + "',null, 'toolbar=no,menubar=no,location=no');" %>">edit</a>
Karl
"George Durzi" <gd****@hotmail.com> wrote in message news:Ox**************@tk2msftngp13.phx.gbl... I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=", DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>' target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this new window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click", "window.open("Product.aspx?id=", null, "toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url I'm going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this?
Karl,
A weird thing happens now when you click the href. It open the new window
properly. However the starting window now just says "[object]" in the
window.
If I put a target="_blank" in the href, I end up with three windows.
The original window
A window with "[object]" in it
and the window opened by the window.open command
"Karl" <none> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Why not just do something like: <a href="<%#"javascript:window.open('PDFReader.aspx?i d=" + DataBinder.Eval(Container.DataItem, "ProductUniqueId") + "',null, 'toolbar=no,menubar=no,location=no');" %>">edit</a>
Karl
"George Durzi" <gd****@hotmail.com> wrote in message news:Ox**************@tk2msftngp13.phx.gbl... I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=", DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>' target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this new window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click", "window.open("Product.aspx?id=", null, "toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url I'm going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this?
Thomas' idea will work too..and is normally what I'd advocate. If you have
having problems with my code, make sure you got your single and double
quotes perfectly...it took me more than a couple tries to get all my i's
dotted and my t's crossed :)
Karl
"George Durzi" <gd****@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl... Karl, A weird thing happens now when you click the href. It open the new window properly. However the starting window now just says "[object]" in the window.
If I put a target="_blank" in the href, I end up with three windows.
The original window A window with "[object]" in it and the window opened by the window.open command
"Karl" <none> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Why not just do something like: <a href="<%#"javascript:window.open('PDFReader.aspx?i d=" + DataBinder.Eval(Container.DataItem, "ProductUniqueId") + "',null, 'toolbar=no,menubar=no,location=no');" %>">edit</a>
Karl
"George Durzi" <gd****@hotmail.com> wrote in message news:Ox**************@tk2msftngp13.phx.gbl... I currently have an href inside of an asp:repeater
<a href='<%# String.Concat("PDFReader.aspx?id=", DataBinder.Eval(Container.DataItem, "ProductUniqueId")) %>' target="_blank">View</a>
Clicking View will open a new browser and load PDFReader.aspx
My client would like me to hide the address bar and toolbar on this
new window.
Here's what I was thinking:
1. Change the Href to an <asp:linkbutton>, something like this:
<asp:linkbutton id="lnkView" runat="server" text="View"/>
2. On the ItemCreated event of the Repeater
Add an onclick attribute to the linkbutton.
something like (pseudo code)
(linkbutton) repeater.findcontrol("lnkView").Attributes.Add("on click", "window.open("Product.aspx?id=", null, "toolbar=no,menubar=no,location=no")");
my issue is, I need to append a querystring value to id= so the url
I'm going to is actually "Product.aspx?id=" + ProductUniqueId
How can I do this?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fresh Air Rider |
last post by:
Hi
Could anyone please give me the syntax for calling a function with
more than one parameter from an <asp:LinkButton> ?
Many thanks
John
|
by: Fresh Air Rider |
last post by:
Hello
Could anyone please explain how I can pass more than one
arguement/parameter value to a function using <asp:linkbutton> or is
this a major shortfall of the language ?
Consider the...
|
by: Fresh Air Rider |
last post by:
Can anyone please tell me why I get a javascript error (expected ';')
when I simply add an <asp:LinkButton> to a User Control and the
reference that user control in a webpage ?
The...
|
by: Fresh Air Rider |
last post by:
Hello
Could anyone please explain how I can pass more than one
arguement/parameter value to a function using <asp:linkbutton> or is
this a major shortfall of the language ?
Consider the...
|
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,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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...
| |