c# - How do I use the hyperlink field in gridview, a new pop-up, to link back to my main page -


i have created page button opens new page, pop-up if will.

btntoolbarsearch.attributes.add("onclick", "window.open('dagboksearch.aspx','','height=600,width=600');return false"); 

on new page opens have gridview below info. (you search on "from date" "to date" , records in between.)

enter image description here

the first column says "gå till" link

<asp:hyperlinkfield datanavigateurlfields="foretag"                      datanavigateurlformatstring="userprofile.aspx?id={0}"                      text="gå till" /> 

i link me previous page , open object corresponding id, i'm not sure how accomplish this. maybe there better way 1 i'm using i'm still learning.

you should able use window.opener property reference parent window. can set it's url selected link, , close popup window.

something should trick:

// place near closing </body> tag // nb uses jquery , event delegation $(function() {             $('table').on('click', 'tr > td:first > a', function(event) {         if (window.opener) {             event.preventdefault();             window.opener.location.href = this.href;             window.close();         }     }); }); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -