<a href="ses.aspx?RPTID=rpt_id_abc">rpt abc</a>
// aspx file:
<p class="frmClass">built report form</p>
<div id="cdseRptContainerID" ng-app="cdse_site_app" ng-controller="<%=RPT_CTRL%>" ng-init="initTags(<%=RPTID %>)">
<div ng-bind-html="rptHtmlTags"></div>
</div>
// aspx.cs file:
public string RPTID = "Default_RPT_ID";
public string RPT_CTRL = "Default_RPT_CTRL";
protected void Page_Load(object sender, EventArgs e)
{
RPTID = Request.QueryString["RPTID"];
if (RPTID != null)
{
RPT_CTRL = RPTID + "_CTRL";
}
}
//loadFormModule.js
angular.bootstrap(document.getElementById("includeEmailFormID"), ["cdse_site_app"]);
angular.bootstrap(document.getElementById("includeFormID"), ["cdse_site_app"]);
angular.bootstrap(document.getElementById("includeFormElemenrID"), ["cdse_site_app"]);
angular.bootstrap(document.getElementById("includeFormSubmitID"), ["cdse_site_app"]);
//test password and session and page redirect
angular.bootstrap(document.getElementById("includePswdSessionID"), ["cdse_site_app"]);
//angular.bootstrap(document.getElementById("asychronizeDivID"), ["cdse_site_app"]);
angular.bootstrap(document.getElementById("cdseRptContainerID"), ["cdse_site_app"]);
// cdse_form.js:
// A report option page control: demo
myApp.controller('rpt_id_abc_CTRL', ['$scope', '$window', function myController($scope, $window) {
$scope.rptHtmlTags = '<p>Rpt Tag Not Set</p>';
$scope.initTags = function (rptid) {
$scope.rptHtmlTags = '<p>This is rpt id: ' + rptid + '</p>';
};
$scope.submit = function () {
if ($scope.userName) {
// $window.location.href = 'rpt1.aspx?user=' + this.tmpUser;
}
else {
//direct goto rpt1.aspx without queryString
$window.location = "../rpt1.aspx";
$window.location.reload();
}
};
} ]);
No comments:
Post a Comment