I would like the following link to open in a new page at a certain size, e.g 400px by 400px any ideas??
class="link" id="paints" runat="server" target="_blank" href='<%# String.Format( "details.aspx?id={0}", Container.DataItem( "ProductID" ) ) %>'>Link
thanks
Check out this page for the window.open method:
http://www.devguru.com/Technologies/ecmascript/quickref/win_open.html
hiya thanks for your help however I am unsure where I would put that information in my new page, the new page code I have already is.... thanks
<%@. Page Language="VB" %>
<%@. import Namespace="System.Data" %>
<%@. import Namespace="System.Web.UI.WebControls.Image" %>
<%@. import Namespace="System.Data.OleDb" %>
<script runat="server">
Sub Page_Load
Dim intProductID As Integer
Dim conMurraysdb As OleDbConnection
Dim strSelect As String
Dim cmdSelect As OleDbCommand
Dim dtrResult As OleDbDataReader
intProductID = Int32.Parse( Request.QueryString( "id" ) )
conMurraysdb = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=D:\Domains\murraysfordesign.co.uk\db\Murraysdb.mdb" )
strSelect = "Select * From Products WhereProductID=@.ProductID"
cmdSelect = New OleDbCommand( strSelect, conMurraysdb )
cmdSelect.Parameters.Add( "@.ProductID", intProductID )
conMurraysdb.Open()
dtrResult = cmdSelect.ExecuteReader( CommandBehavior.SingleRow )
If dtrResult.Read Then
lblResult.Text = dtrResult( "Product" )
lblPrice.Text = dtrResult( "price" )
lblSize.Text = dtrResult( "size" )
lblDescription.Text = dtrResult( "Description" )
img_product.ImageURL = dtrResult( "Image_url" )
End If
dtrResult.Close()
conMurraysdb.Close()
End Sub
</script>
<html>
<head>
<title>Details.aspx</title>
</head>
<body>
<form runat="Server">
<table height="450" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td colspan="3" height="20">
</td>
</tr>
<tr>
<td valign="top" width="120">
</td>
<td valign="top" width="338">
<p style="FONT-SIZE: 13px; COLOR: #cc3333; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif">
<b><asp:Label id="lblResult" runat="Server" font-size="12px" font-bold="True" font-names="Verdana, Arial, Helvetica, sans-serif"></asp:Label></b>
</p>
<br />
<p style="FONT-SIZE: 11px; COLOR: #333333; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif">
Description:
</p>
<blockquote><asp:Label id="lblDescription" runat="Server" font-size="11px" font-names="Verdana, Arial, Helvetica, sans-serif"></asp:Label></blockquote> <blockquote><asp:Label id="lblSize" runat="Server" font-size="11px" font-names="Verdana, Arial, Helvetica, sans-serif"></asp:Label></blockquote> <blockquote>£ <asp:Label id="lblPrice" runat="Server" font-size="11px" font-names="Verdana, Arial, Helvetica, sans-serif"></asp:Label></blockquote></td>
<td valign="top" width="342">
<asp:Image id="img_product" runat="server"></asp:Image>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
0 comments:
Post a Comment