C
Chris
Hi,
i created an ImageButton within an ItemTemplate of a datalist (in
shop.aspx). There are two possibilities:
1) when the user is logged and he clicks on an image, he must be
'postbacked' to another file showing that same picture in big size and with
more info..
2) when not logged and clicking on an image, he must be 'postbacked' to the
login page (log.aspx).
So i put the PostBackUrl property in code-behind like this:
Dim dl As DataList
Dim im As ImageButton
dl = form1.FindControl("DataList1")
im = dl.Items(0).FindControl("ImageButton1")
If User.Identity.IsAuthenticated Then
im.PostBackUrl = "Eval(""ProdNR"", ""prodItem.aspx?ProdNR={0}"")"
Else
im.PostBackUrl = "~/log.aspx"
End If
My double problem is:
1)when not logged, if i click on the first image, i'm postbacked to
log.aspx, but clicking on another image: nothing happens
2) when logged, if i click on the first image, i ger the error: "illegal
characters in path', and clicking on another image: same as 1): nothing
happens.
Any help would be appreciated.
Thanks
Chris
i created an ImageButton within an ItemTemplate of a datalist (in
shop.aspx). There are two possibilities:
1) when the user is logged and he clicks on an image, he must be
'postbacked' to another file showing that same picture in big size and with
more info..
2) when not logged and clicking on an image, he must be 'postbacked' to the
login page (log.aspx).
So i put the PostBackUrl property in code-behind like this:
Dim dl As DataList
Dim im As ImageButton
dl = form1.FindControl("DataList1")
im = dl.Items(0).FindControl("ImageButton1")
If User.Identity.IsAuthenticated Then
im.PostBackUrl = "Eval(""ProdNR"", ""prodItem.aspx?ProdNR={0}"")"
Else
im.PostBackUrl = "~/log.aspx"
End If
My double problem is:
1)when not logged, if i click on the first image, i'm postbacked to
log.aspx, but clicking on another image: nothing happens
2) when logged, if i click on the first image, i ger the error: "illegal
characters in path', and clicking on another image: same as 1): nothing
happens.
Any help would be appreciated.
Thanks
Chris