Help On passing primary key from one page to another on link button click

Posted by Vijayar under C# on 2/21/2012 | Points: 10 | Views : 1652 | Status : [Member] | Replies : 4
Hi
I need to pass the primary key of job table ie.jobId from one page to another page.
i.e i am displaying all jobs in a page.When i click on link button i am displaying the details of job in a pop up.In Pop up i am placing another link button and redirecting to apply page.Now i need to catch job id in this page how to do this.Help Me it's urgent

vijaya


Responses

Posted by: Ppathi on: 2/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Use OnClientClick event in the link button and call the Javascript and pass the jobid value as querystring to another page

Thanks & Regards,
Pasupathi G
No Pain No Gain

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vijayar on: 2/21/2012 [Member] Starter | Points: 25

Up
0
Down
Can use send me the syntax to do this.It's Very Urgent


vijaya

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ppathi on: 2/21/2012 [Member] Starter | Points: 25

Up
0
Down
Sample Code

<asp:LinkButton ID="submit" runat="server" Text="Submit" OnClientClick="javascript:transfer('<%=Jobid%>')"></asp:LinkButton>


<script language="javascript">
function transfer(opt)
{
window.open("/testpopup.aspx?jobid="+opt,'Title','width=200,height=100')
}
</script>

Thanks & Regards,
Pasupathi G
No Pain No Gain

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheonarayan on: 2/21/2012 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Vijayar,

Read this article, it has the solution of the problem you are facing http://www.dotnetfunda.com/articles/article1652-how-to-get-the-primary-key-value-of-the-gridview-rows-in-javascript-or-popu.aspx

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response