I have this select tag where I have to transfer the value of an option to a cs file. I've tried workarounds that includes
runat="server"
but unfortunately it does not work for me. Here is the select code.
<select ng-model="selectedProject" name="selectproject" id="selectproject"
ng-change="set(); viewfunctions()"
class="btn btn-default btn-group-justified"
data-toggle="dropdown">
<option></option>
<option ng-repeat="Proj in TaxProjects" value="{{Proj.Data}}">
{{Proj.Name}}
</option>
</select>
<input type="text" ng-model="hfsp" id="hfselectproject" name="hfselectproject" />
have tried Hidden input / hidden form
<input type="text" ng-model="hfsp" id="hfselectproject" name="hfselectproject" />
the set function is just an angular function which sets the input to be the value taken from the selection.
$scope.set = function () {
$scope.hfsp = angular.copy($scope.selectedProject);
}
Viewfunctions is just a function that calls other functions.
$scope.viewfunctions = function () {
GetAllHeader();
GetAllType();
GetAllHeader();
ClearFields();
}
so here's what I'm trying to do
var getHeaderID = {
ProjectID: $scope.selectedProject
}
this is from the select tag, I have stored it as an angular variable but am unable to find any ways in introducing it to a .cs
file (asp.net/C#).
What would be alternatives for runat="server"
, where I can access the $scope.selectedProject
in a .cs file