to get the values in javascript to C#(plz help some one plz........)
-
hi please help me..... am doing a mantanence project. i have writen some code to copy a file from server to harddisk. but there is some problem. i have developed this as windows application. now they want as web. tyhe problem is, i was reading the file path and copying in dos.in windos the path is already is there in html page in javascript. can i move the value to a the code behind string(C#). if we can convert how is it possible? in code behind there is
string Customer, book
on html page there is values ofcustomer1 and journal
asvar customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>';
how can we get the values of customer1 and journal to Customer, book please help me.... please -
hi please help me..... am doing a mantanence project. i have writen some code to copy a file from server to harddisk. but there is some problem. i have developed this as windows application. now they want as web. tyhe problem is, i was reading the file path and copying in dos.in windos the path is already is there in html page in javascript. can i move the value to a the code behind string(C#). if we can convert how is it possible? in code behind there is
string Customer, book
on html page there is values ofcustomer1 and journal
asvar customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>';
how can we get the values of customer1 and journal to Customer, book please help me.... pleaseIf you read the values in javascript from the Session object...why don't you read on the server (code behind) from the Session object also?
There are 10 kinds of people: those who understand binary and those who don't
-
If you read the values in javascript from the Session object...why don't you read on the server (code behind) from the Session object also?
There are 10 kinds of people: those who understand binary and those who don't
This is a mainanance project. am biginer to .net so dont know much. i dont know how to do that. thats y am asking. i just want to know how we can get the value of javascript variable in c# This is the function in javascript
function display() { var localpath1 = document.getElementById('lblerr'); lblerr.innerText = localpath; }
-
This is a mainanance project. am biginer to .net so dont know much. i dont know how to do that. thats y am asking. i just want to know how we can get the value of javascript variable in c# This is the function in javascript
function display() { var localpath1 = document.getElementById('lblerr'); lblerr.innerText = localpath; }
from the javascript function i understand that you have an asp:Label control on your page. In this case in the code behind just use:
string Value = lblerr.Text;
My first reply referd at this code you wrote:
var customer1 ='<%=Session["customer"]%>'; var journal = '<%=Session["journal"]%>';
Using <%=Session["customer"]%> means that you insert a C# call to retrieve data from the Session object, which is also available in the code behind.string customerValue = (string)Session["customer"];
Hope it helps.
There are 10 kinds of people: those who understand binary and those who don't