Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Aprire Popup da link contenuto in un repeater

    In un repeater ho inserito un HyperLink e nella Repeater1_ItemDataBound ho inserito:
    [CODE]
    Protected Sub Repeater1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater1.ItemDataBound
    If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.EditItem Then
    Dim link As HyperLink = CType(e.Item.FindControl("ArgLink1"), HyperLink)
    link.Attributes.Add("onclick", "window.open('DescrizioneProdotto.aspx?idprodotto= ',null,'height=250, width=250,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no, top=400, left=400');")
    End If
    End SubCODE]
    Mi serve per aprire un PopUp al quale gli passo l'id del prodotto(ovviamente essendo in un repeater ogni link avrà il suo idprodotto), come posso fare?

  2. #2
    Trovata soluzione:
    codice:
    String.Format("window.open('DescrizioneProdotto.aspx?idprodotto={0}',null,'height=250, width=250,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no, top=400, left=400');", DataBinder.Eval(e.Item.DataItem, "Name"))

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.