|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Gridview hypterlink colomn to popup a new windowHi,
I added the script in the gridview hyperlink colomn for " DataNavigateUrlFormatString = "javascript: var w= ...", but once I added javascript here instead of " DataNavigateUrlFormatString ='mypopwin.aspx?ID={0}' ", the hyperlink text lost hyperlink, becomes regular text, which means I can't click on it, how can I fix it? Thanks , Jasmine Hello Jasmine,
There seems to be a subtle difference between the way the GridView’s HyperLinkColumn behaves when the hyperlink is a javascript (instead of a Url) and the way the DataGrid’s HyperLinkColumn used to behave. http://www.webswapp.com/codesamples/aspnet20/hyperlinkfield/ In this demo I tried 4 scenarios: 1- A HyperLinkField within a GridView: where I set the DataNavigateUrlFormatString="javascript:alert('you selected {0}');" 2- A HyperLink within an ItemTemplate inside a GridView; where I set the NavigateUrl='<%# FormatLink(Eval("Text")) %>' 3- A regular anchor tag (runat=â€serverâ€) within an ItemTemplate inside the GridView where I set the href='<%# FormatLink(Eval("Text")) %>' 4- The HyperLinkColumn within a DataGrid where I set the DataNavigateUrlFormatString="javascript:alert('you selected {0}');" Out of those 4 scenarios, the last 3 scenarios work but the first does not. Show quoteHide quote "Jasmine" wrote: > Hi, > I added the script in the gridview hyperlink colomn for " > DataNavigateUrlFormatString = "javascript: var w= ...", but once I added > javascript here instead of " DataNavigateUrlFormatString > ='mypopwin.aspx?ID={0}' ", the hyperlink text lost hyperlink, becomes regular > text, which means I can't click on it, how can I fix it? > > Thanks , Jasmine > >
detailsview, inserting new record and request.querystring
asp.net 2.0 treeview control - very slow DataGrid not responding to Update/Cancel click A question about Repeater control Get data, make textBoxes, edit values, and re-save to database. Simple? Datagrid soes not page nor edits Menu Control - SubItem Shadows Flickering imagebutton with smartnavigation on Any Help on TabStrip Control?? disabling back button of window |
|||||||||||||||||||||||