I've been messing with the code all day now, and I've got nothing to show for it.
What I'm trying to do is I have set it up to allow 6 images on the showad page, and there is a link underneath it to display more images.
The link will open a new window, but it is not carring over the "AdId" My code for the link is:
<asp:LinkButton ID="PhotoTour" runat="server" PostBackUrl="PhotoTour.aspx" OnClientClick="javascript:window.open('PhotoTour.aspx', '_new', 'scrollbars=yes,menubar=no,status=no,resizable=yes,width=700,height=650');return false;"
CssClass="style11">More Photos . . .</asp:LinkButton>
I'm thinking there's something I should be adding in the code behind file on the page_load event, which is currently:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
' Check if the URL querystring contains a valid ad.
Dim adId As Integer = DefaultValues.IdNullValue
Dim adIdQs As String = Request.QueryString("id")
If Not (adIdQs Is Nothing) AndAlso Not (Int32.TryParse(adIdQs, adId)) Then
Response.Redirect(
"~/Search.aspx")
End If
If Not Page.IsPostBack Then
If User.Identity.IsAuthenticated Then
Me.ResponseContactEmailTextBox.Text = Membership.GetUser().Email
Me.EmailSenderAddressTextBox.Text = Membership.GetUser().Email
Me.ResponseContactNameTextBox.Text = Profile.FirstName & " " & Profile.LastName
Me.EmailSenderNameTextBox.Text = Profile.FirstName & " " & Profile.LastName
End If
End If
End Sub
Trying to get this right I even completely copied the "showad" page and built the new window off of that, no luck though.
Thank you in advance
Be sure to visit
www.detelli.comAnd please remember to click ?Mark as Answer? on the post that helps you.
This can be beneficial to other community members reading the thread.