p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning HTML, XHTML, CSS, and JavaScript (http://p2p.wrox.com/forumdisplay.php?f=541)
-   -   A HREF does not contain onclick server side function call. Please help (http://p2p.wrox.com/showthread.php?t=92634)

swatisri April 11th, 2014 11:20 PM

A HREF does not contain onclick server side function call. Please help
 
In the below function, I want to call “CallCreateorOpenForm” when I click “Open Draft" - open existing file from db. Lauch summary should verify, create new form and load new form. Currently onload everything will be created. However I want to create new form only when there is no form exist in the db that means when I click lauch Summary, it should call CallCreateFormorOpenFormURL function. Will you please help?
Onload page
{
ArrayList arraryList = new System.Collections.ArrayList();
var advisees = ReviewHelpers.GetAdvisees(employeeCode, CurrentReviewPeriod);
if (advisees.Count() > 0)
{
for (int i = 0; i < advisees.Count(); i++){
string LaunchSummaryURL = "#";
LaunchSummaryURL = CallCreateFormorOpenFormURL(advisees[i].SummaryCode.ToString(), advisees[i].EmployeeCode, advisees[i].ReviewId);
string LaunchSummaryLink = "<a href='" + LaunchSummary + "'>" + advisees[i].SummaryLinkHere.ToString() + "</a>";
arraryList.Add(new MyObject(myEmpName, advisees[i].TotalReviews.ToString(), advisees[i].BillableHours.ToString(), LaunchSummaryLink, advisees[i].DateLastModified)); }
RadGrid.DataSource = arraryList;
} }
private string CallCreateFormorOpenFormURL (string SummaryCode, string EmpCode, string ReviewId)
{
string returnURL = "";
//// ….dbcall to get records…..
if (SummaryCode == "Open") {
returnURL = string.Format("/Reviews/AdvSummAnalystToResearchAssociate.aspx?ReviewId={0 }", ReviewId);
}
Else {
CreateNew = CreateSummaryReview(empAdvisor, empReviewer, empAdvisor, CurrentEmployee, true); // this will create new db record with ReviewId
returnURL = string.Format("/Reviews/AdvSummAnalystToResearchAssociate.aspx?ReviewId={0 }", CurrentReview.ReviewId);
}
return returnURL;
}


All times are GMT -4. The time now is 08:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.