Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
juicyapple
Posting Yak Master
176 Posts |
Posted - 2008-06-09 : 01:32:34
|
Hi,I have a datagrid with a hyperlink column. In itemdatabound event, I set the navigateurl of the hyperlink. Using the javascript:window.showModalDialog will encounter problem "Access is denied", but the second one works fine (the commented code). Anyone has idea pls share with me. Thanks.Protected Sub dg1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dg1.ItemDataBoundIf e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Thenhlink.NavigateUrl = "javascript:window.showModalDialog('..\..\OnlineSys\AttachFile.aspx','resizable:yes;scroll:yes;dialogHeight:600 px;dialogWidth:900 px');"'this is OK.'hlink.NavigateUrl = "..\..\OnlineSys\AttachFile.aspx"end ifend sub |
|
ayamas
Aged Yak Warrior
552 Posts |
Posted - 2008-06-09 : 02:55:26
|
I also had encountered this problem some time back.It got resolved when I wrote a seperate javascript function.Try this1)Your javascript codefunction openwindow(url){ window.open(url);}2)In the datagrid Itemdatabound you can write like this.hlink.NavigateUrl="javascript:openwindow('http://please write the whole path of the page')" |
|
|
|
|
|