|
We can also use session variables here......
|
|
|
|
|
Hi,
Thanks for your reply.
But I dont know how to use session here.Please give any sample code.
Regards
Bijesh
|
|
|
|
|
example of using session variables in Java Script
function showThankyouMsg(){
var imgwidth, imgheight, messhead, mess1, mess2, mess3, divleft, messageType;
var strCancelCheckIn = '<%=Session["AgreeYN"]%>';
var strPaymentOption = '<%=Session["paymenttype"]%>';
var visitInfoCorrectYes = '<%=Session["visitInfoCorrectYes"]%>';
var strcopayamount = '<%=Session["copayamount"]%>';
var strprimaryins = '<%=Session["primaryins"]%>';
var strcopaytransfail = '<%=Session["copaytransaction"]%>';
var SpeakToStaff = '<%=Session["hydSpkToStaff"]%>';
var paytype = '<%=Session["paymenttypeCash"]%>';
....................
}
|
|
|
|
|
take the value like this
var strSessionValues = document.getElementById('divSessionValues').innerText;
and assign it to the session variable....
|
|
|
|
|
Hi,
ok.How i connect this with my coding?pls go through my first post.where i put session state and I need to assign the label value to session.but here session is assign to a varriable.How I take the value in aspx.cs?
Please give some details.
Thanks again,
Bijesh
|
|
|
|
|
You had a value in JavaScript and want to display it in a label as well as pass it to .aspx.cs file Right??
Write a Separate JavaScript function for that
1. First calculate the value and Place it in the session (use can use above)
2. assign it to the label using (document.getElementById("lblBirthDate").value = '<%=Session["birthdate"]%>';)
3. Call this function on pageload or button click...
~JJ
|
|
|
|
|
Hai,
I write the function like this.
function calculate()
{
alert('welcome');
document.getElementById("<%=lbl_netamount.ClientID%>").innerText
= currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
var amount= document.getElementById("<%=lbl_netamount.ClientID%>").innerText;
'<%=Session["Amount"]%>'=amount;
document.getElementById("lbl_netamount").value = '<%=Session["Amount"]%>';
}
How I call it in aspx.cs page??
Thanks
Bijesh
|
|
|
|
|
Hi,
Please give some sample code for how assigning hiddenfield to the label and how used it in code....
Thanks
Bijesh
|
|
|
|
|
bijeshputhalath wrote: <asp:label id="lblop" runat="server"> document.getElementById("lblop").innerText = currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
drop in a hidden field on to ur UI, set an ID for it for eg:Hid1 and in javascript wtite the following code
document.getElementById("Hid1").value=currency_show_conversion(document.getElementById("lbl_netamt").innerText,"INR","USD");
and now wherevever u need to acces this value in code behind, use
String currency=Hid1.value;
and currency has the value returned by the javascript function.
When you fail to plan, you are planning to fail.
|
|
|
|
|
category name will be retrive from database and display gridview...
if click any one category name the subcategory will be displayed in the menu format..
how to add the sub category middle of the gridview
pls give any idea....
|
|
|
|
|
Dont put question as your subject, give more detail
Do we have to explain to you what subject means?
Have you got any code so far?
Try retrieving data from the database and then binding to the gridview and work from there
We are not a Code Charity
|
|
|
|
|
.netman wrote: Dont put question as your subject, give more detail
Check out this poster's past questions
Ive totally given up on aswering this person's questions.
|
|
|
|
|
None of your questions will be answered until such time you work out how to write a decent subject. You have been asked politely innumerable times.
|
|
|
|
|
yes , I agree too this person doesn't know how to post questions in forums, I think we should create a tutorial for him how to post questions in forums.
|
|
|
|
|
Don't worry Nithydurai. Spend some time time framing your question, read it twice before you post. If you think every one can understand ur question post it.
If you spend a few more minutes framing your question, you can get a more accurate answer. Thus saving UR Time and Our time.
|
|
|
|
|
Has titled EVERY post "question"
Still uses text speak
|
|
|
|
|
Hi,
I am able to get the client IP address using the following 3 ways
string test = Request.UserHostAddress.ToString();
string test2 = Request.ServerVariables["REMOTE_ADDR"].ToString();
string test3 = Context.Request.UserHostAddress.ToString();
All are returning the same values...
But which one is the Best (accuracy and performance wise) and More reliable in all respects. Which one should I use??
Regards,
~JJ
|
|
|
|
|
|
Mogaambo kush hua
|
|
|
|
|
|
They are all the same. However, they are already strings, so there is no reason to use ToString:
string test = Request.UserHostAddress;
string test2 = Request.ServerVariables["REMOTE_ADDR"];
string test3 = Context.Request.UserHostAddress;
Also:
string test4 = Context.Request.ServerVariables["REMOTE_ADDR"];
string test5 = Page.Request.UserHostAddress;
string test6 = Page.Request.ServerVariables["REMOTE_ADDR"];
string test7 = Page.Page.Request.UserHostAddress;
string test8 = Page.Page.Request.ServerVariables["REMOTE_ADDR"];
string test9 = HttpContext.Current.Request.UserHostAddress;
string test10 = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
string test11 = ((Page)(HttpContext.Current.Handler)).Request.UserHostAddress;
string test12 = ((Page)(HttpContext.Current.Handler)).Request.ServerVariables["REMOTE_ADDR"];
string test13 = ((Page)(HttpContext.Current.Handler)).Page.Request.UserHostAddress;
string test14 = ((Page)(HttpContext.Current.Handler)).Page.Request.ServerVariables["REMOTE_ADDR"];
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
when i deploy my webapplication on IIS.trying to open browse from
another machine getting HTTP:404 error
please help me
madhavi.kona
|
|
|
|
|
is your web application held locally or is it on a server?
Sounds to me like it is on a local machine
We are not a Code Charity
|
|
|
|
|
I Have created a Web Application in ASP.NET 2.0, my requirement is to get the user system information.
i.e. when the user logons to the webpage, In the home page i have to read the system information (Like OS, OSVERSION, MANUFACTURER.)..
Is it possible to do in Javascript.. If it is not possible in Javascript then is there any other way to this..??
|
|
|
|
|
Check this out:
http://www.codeproject.com/KB/system/GetHardwareInformation.aspx
We are not a Code Charity
|
|
|
|