TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
768.3k
Fetch value using hidden field but not worked
Sep 16 2016 1:29 AM
My code as follows
function AddNewCriticalResource() {
var pro = $("#ms").val();
var ProjectIds = pro.toString();
var projectNames = $("#ms").text();
var addordelete = 1;
$.ajax({
type: "POST",
url: "CriticalResource.aspx/AddNewCriticalResource",
contentType: "application/json; charset=utf-8",
data: '{ stringAssociateIds: "' + associates + '", stringProjectIds: "' + ProjectIds + '", stringTaggedBy:"' + AssocID + '" }',
dataType: "json",
responseType: "json",
cache: false,
success: function (msg) {
var TableData = $.parseJSON(msg.d);
var alertString = '';
noOfRows = 0;
$.each(TableData, function (i, data) {
alertString = alertString + data.AssociateID + '-' + data.ProjectName + ', ';
noOfRows = i + 1;;
});
from the above code i want to get projectNames into code behind page.
i tried my code as follows
var projectNames = $("#ms").text();
$("#projectNames").val($("#ms").text());
<input type="hidden" id="projectNames" runat="server" clientidmode="Static"/>
My code behind page code as follows
string projectid = projectNames.Value;
var supplyData = this.objBusinessLayer.FetchCriticalResourceDetailsOnProjectId(projectid);
when i check the above code in code behind page, in the above line
string projectid = projectNames.Value;
in projectname value is not coming.
can you please tell me. what is the mistake in my code. i tried but it is not working.
Reply
Answers (
2
)
How to copy contents from an excel to a word in a table.
how to get data 25 column of 100 column from datatable