Question : Asp.Net I am having problem trying to access a page & passing it querystring value.

I have a Link Button in a gridview column 'update Images" see picture.
the template code is;
          <asp:TemplateField HeaderText="Update Images"  ItemStyle-HorizontalAlign="Center" HeaderStyle-ForeColor="Blue" ControlStyle-Width="20">
           <ItemTemplate>
          <asp:Linkbutton ID="lbkPAssID"  OnClientClick='<%# "popup(""Update.aspx?" & DataBinder.Eval(Container.DataItem, "Id") & ""","""");return false;" %>' runat="server" Text='<%# Bind("Id") %>' />
          </ItemTemplate>
          </asp:TemplateField>
---------------------------------------------------
the Update.aspx  is at the same level as GridView page.
But it does not come up into view?

I do not know? what is wrong I really do not need the popup...

what I do need ..is to bring up the update.aspx page and to be able to pass the query string (id) value to its code behind page....
Attachments:
 
GridView with LinkButton
GridView with LinkButton
 

Answer : Asp.Net I am having problem trying to access a page & passing it querystring value.

In order to use the "header()" function in line 26 below, the PHP code Must come first with not even a space before it.  Even a space before it will be sent to the browser and then headers Can't be sent.  "$headers" is a variable to hold the 'header' info for the email message.  The "header" from the "header()" function is the one that the server sends to the browser to tell it what is coming.  'header' in both cases refers to something Before the actual message or information.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
<?php 
$to = $_REQUEST['sendto'] ; 
$from = $_REQUEST['Email'] ; 
$name = $_REQUEST['Name'] ; 
$headers = "From: $from"; 
$subject = "Web Contact Data"; 
$fields = array(); 
$fields{"Name"} = "Name"; 
$fields{"Company"} = "Company"; 
$fields{"Email"} = "Email"; 
$fields{"Phone"} = "Phone"; 
$fields{"list"} = "Mailing List"; 
$fields{"Message"} = "Message"; 
$body = "We have received the following information:\n\n"; 
foreach($fields as $a => $b){ 	
	$body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } 
	$headers2 = "From: [email protected]"; 
	$subject2 = "Thank you for contacting us"; 
	$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com"; 
	if($from == '') {$ermsg = "You have not entered an email, please go back and try again";} 
	else { 
		if($name == '') {$ermsg = "You have not entered a name, please go back and try again";} 
		else { 
			$send = mail($to, $subject, $body, $headers); 
			$send2 = mail($from, $subject2, $autoreply, $headers2); 
			if($send) {header( "Location: http://www.discretedata.com/Test/thankyou.html" );} 
			else {$ermsg = "We encountered an error sending your mail, please notify [email protected]"; }
		} 
	} 
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php 
echo $errmsg;
 ?>
</body>
</html>
Random Solutions  
 
programming4us programming4us