Pop Window

ddvniek

New Member
In standard ASP code, I used the javascript window.open to display a detail window that could be opened from links on each row of a table. I simply used <a href "Javascript:PopDetail('../linkname.asp?id = whatever'... to open the detail window. Any ideas on implementing similar functionality in ASP.NEt using the datagrid? I can open a window and pass it parameters using the HyperLinkColumn but I would like to set the size of the detail window, and configure the toolbars, etc., - which can be done in javascript. I can't put the Javascript in the HyperLinkColumn link - I don't think that it can find the client side script...?<BR><BR>Thanks, DaveThe same way. Just create your javascript code and place it in your .aspx page and call it from your onclick command from an aspx object, like a button or link.puting javascript in datagrid will not work since the control name is generated dynamicly. But you can use 'onItemCreated' of datagrid. hope the following url will help you.<BR><BR>http://www.aspalliance.com/aldotnet/examples/cd.aspx <BR> <BR>regards<BR>RajkumarMore or less as omny suggested, you can just make a template column and add a regular old (not .net hyperlink) link. This example grabs the value of a pulldown menu on a form and uses that value for a popup parameter:<BR><BR><a href=http://aspmessageboard.com/archive/index.php/"#" onClick="window.open('site_thumbview.aspx?templateID=' + document.imageUpload.lstTemplates.options[document.imageUpload.lstTemplates.selectedIndex].value,'flyout','resizable=no,scrollbars=no,width= 640,height=170,top=30,left=30');<BR><BR>Now if you want to do a similar thing where you grab the value of a control within a datagrid, you'll probably have to go with the onItemDataBound as the previous poster suggested. If, however, you just need to pass the link some parameters from a db select then the above example would work, just remove the stuff grabbing the value of the select and put in the usual <%# DataBinder.Eval(Container.DataItem, "fieldName")%><BR><BR>Cheers,<BR>])ryWhat is a template column and how do you do it?
 
Back
Top