Last post May 18, 2016 08:11 PM by Sumit.Pokhriyal
May 18, 2016 03:09 PM|vstorpedo|LINK
I do have the following ItemTemplate in a GridView:
PostBackUrl='<%# Convert.ToString(Eval("NavigateUrl")) %>'
ImageUrl='<%# Convert.ToString(Eval("ImageUrl")) %>'
The PostBackUrl works fine when the ‘NavigateUrl’ data that I’m getting from the database have a format like:
https://www.youtube.com/, however when the address is more specific like:
https://www.youtube.com/watch?v=A-XlyB_QQYs , the browser does not display anything, just a blank page. I copied the same address that the browser is displaying to another window, and it displays the
right video. I don’t get it, what is the problem?
Another thing that I did was to be sure that I’m passing a string, so, instead of just: PostBackUrl='<%# Convert.ToString(Eval("NavigateUrl")) %>'
I changed to this: PostBackUrl='<%# Convert.ToString(Eval("NavigateUrl").ToString) %>'
But is not working either. Could anyone help me here? Thanks
May 18, 2016 06:55 PM|Sumit.Pokhriyal|LINK
Did you check error in chrome developer tools console ? There might be error not allowing the content tot be displayed.
Can you check below in postback url for same video
Is this working ?
May 18, 2016 07:22 PM|vstorpedo|LINK
I opened the developer console and it is completely blank, nothing there. I do not think that there is any problem with the content since the same link opens fine from another location on the Website. This is weird, any other idea? Thanks
May 18, 2016 07:28 PM|Sumit.Pokhriyal|LINK
Did you try with the URL I provided ?
May 18, 2016 08:03 PM|vstorpedo|LINK
Hmm, interesting, yes, the url that you provided works. What since to be the problem here?
May 18, 2016 08:11 PM|Sumit.Pokhriyal|LINK
I don't know why you are not getting error in chrome console, when you click on it.
I hope you are checking console after clicking on it.
Generally when using youtube url, embed url is used when accessing in other applications.
Hope this helps.