|
-
Jan 16th, 2008, 06:45 AM
#1
Thread Starter
Member
[2005] GridView Problem
I have a GridView in my aspx form. In that gridview i have some boundfields.
I have a auto generated button name "Click Me" in template.
After clicking on the button "Click Me", I want a popup window will raise (somepage.aspx).
the "Click Me" button will pass the row information (bound fields value) in session.
Could anyone please help me how to do that with codes. I am a novice in asp.net.(I am using c#, asp.net2005)
-
Jan 16th, 2008, 07:18 AM
#2
Re: [2005] GridView Problem
if you need to popup a window I'd use javascript and the client side onClick to call it and pass the info in the querystring to the popup window, that is If you can avoid using a session and postback.
Code:
<script type="text/javascript">
function popup(url){
window.open(url,'',width=450,height=450')
}
</script>
<grid....>
<template....>
<a href="javascript:void(0)" onClick="popup('yourURL.aspx?keyFied=<%#DataBinder.Eval(Container.DataItem, "dataBaseFieldName")%>">Click Me</a>
</template>
-
Jan 16th, 2008, 10:08 AM
#3
Re: [2005] GridView Problem
You can generate the onClick code using the RowDataBound event of the GridView. I prefer it to using inline code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|