if you only need to open this on a new browser, add the target attribute
<td><a href='moredetails.aspx?p=<
Main Topics
Browse All TopicsGreetings,
I need a pop-up window in asp.net. Below is what I have and it is just simply a link.
<td><a href='moredetails.aspx?p=<
Thanks in advance.
-M
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
slight fix to culshaja's code. missed the open parenthesis
window.open(url, "","height=500,width=700,s
and the 'return false after calling the function to prevent the href from executing.
<a href="#" onclick='<%# "openPopUp(moredetails.asp
I tried both of your codes and returned me the errors. Below is what I have. BTW, I add the javascript openPopUp function in the header already.
The errors are:
Comma, ')', or a valid expression continuation expected.
Overload resolution failed becasue no accessible 'ToString' accepts this number of arguments.
End of statement expected.
<itemtemplate>
<tr>
<td><a href="#" onclick='<%# "openPopUp(moredetails.asp
<div align=left><%#Trim(DataBin
When I put my nouse cursor over the link, it shows the following:
https://.../report.aspx?sh
https://.../report.aspx?sh
Thanks.
I would replace the A with a SPAN that you can then apply the correctstyles to, to make it look like an A. You can then still assign an onClick attribute in the same way.
The following is another example of how I do things:
In the ASPX page:
<SPAN CLASS="fakeLink" ONCLICK='<%# CreateReadMailScript(DataB
In the ASPX.vb page:
Public Function CreateReadMailScript(ByVal
Dim script As New System.Text.StringBuilder
script.Append("window.open
script.Append(messageId)
script.Append("&token=")
script.Append(HttpUtility.
script.Append(""", """",""height=500,width=79
Return script.ToString
End Function
This might be a better way for you.
James :-)
Well. What is wrong with the code below? I think it is much simple and I don't need to worry about passing any parameters.
<td><a href="#" onclick='<%# "openPopUp(moredetails.asp
Thanks.
i see that you're parameter is not passed as string. you need to put quote within it. not a c# expert but try this
<td><a href="#" onclick='<%# "openPopUp(""moredetails.a
Below is what I have but still got same errors as before :(
<td><a href="#" onclick='<%# "openPopUp(""moredetails.a
<div align=left><%#Trim(DataBin
there a missing '&' after the "&phase=". if that doesn't work yet, please post the generated code on this portion.
<td><a href="#" onclick='<%# "openPopUp(""moredetails.a
<%#Trim(DataBinder.Eval(Co
i have used popup Window on DataGrid like this.
protected void dgSubProject_ItemDataBound
{
if(e.Item.ItemType==ListIt
{
HyperLink hStartDate=(HyperLink)e.It
hStartDate.Attributes.Add(
}
}
Add a function popWindow in .aspx page
<script language="javascript">
function popWindow(EmpID)
{
launchCenter("EmpDetailsas
}
function launchCenter(url, name, height, width) {
var str = "height=" + height + ",innerHeight=" + height;
str += ",width=" + width + ",innerWidth=" + width;
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
var xc = (aw - width) / 2;
var yc = (ah - height) / 2;
str += ",left=" + xc + ",screenX=" + xc + ", scrollbars = yes ";
str += ",top=" + yc + ",screenY=" + yc + ", scrollbars = yes ";
}
return window.open(url, "popwindow", str);
}
</script>
it works perfectly on my app
Business Accounts
Answer for Membership
by: culshajaPosted on 2007-06-25 at 07:42:45ID: 19355997
The following is an example I use in my apps:
tatus=yes, toolbar=no ,menubar=n o,location =no,resize able=no,sc rollbars=y es");
x?p=" & Trim(DataBinder.Eval(Conta iner.DataI tem, "proposal")) & "&phase=" Trim(DataBinder.Eval(Conta iner.DataI tem, "sort_code")) & ")" %>'>
<SCRIPT language="javascript" type="text/javascript">
<!--
function openPopUp(url){
window.openurl, "","height=500,width=700,s
}
-->
</SCRIPT>
<a href="#" onclick='<%# "openPopUp(moredetails.asp