|
|
Read This[^] Article.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
|
|
|
|
|
Hi,
It does not create session on every request. Server creates session only once when you declare in your code and keep alive until you have kill it or close the browser.
krishna veer singh
|
|
|
|
|
Please Read[^] this article. This will resolve your query and you can also learn something new from it.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
tanx, but i'm experiencing that is confucing.i use a web service to server the web application. the problem is when user login i create the session
this.Session.Add("customer", customer.CUSTEMAIL);
then insert it to table (db) to restrict the same user log in.
in the log off method i use
customer.CUSTEMAIL = this.Session["customer"].ToString();<=====A
if (Customerinfo.delete_session(customer))
{
this.Session.Abandon();
return "log off successful";
}
else
{
return "log off failed";
}
to delete the record in the db and then destroy the session, but the prolem is when logging off at point A the session count is 0 means no session object and gives null ref exception, could you tell me what is going wrong here.
|
|
|
|
|
Hi,
Only one seesion value will be created
|
|
|
|
|
Hi friends...
Please help....
I have created a setup in VB.NET and installing in different machines. Now the problem is that the same setup is working on some machine fine, while same setup is not working. When i am trying to run the application its giving a message that "unable to find a version of the run time to run this application".
And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Now please help me... i got frustrated with this kind of error.
krishna veer singh
|
|
|
|
|
krishnaveer wrote: I have created a setup in VB.NET and installing in different machines.
Are you talking about Web Setup or Application Setup ?
krishnaveer wrote: And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Does all the system having .Net Framework?
if you want to run it all system, while building the setup,make sure in pre-requisite you have select .NET framework as pre install.
let me know if more issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Dear Expert,
I have Created a User Control Which Display the Match Fixture of the Football Game.
I Place this Control In the Repeator Control and Fixture Data is come from the Database.NOw I want to display that control as a slide show.Means One User control with one data at a time.all the help and suggestion are highly appreciated.
|
|
|
|
|
add the position attribute to the repeater control as relative and for the user control in Item Template add the position style attribute as absolute with left and top as 0.
Also make sure you give a zindex attribute in a progressive way. Then using client side javascript you can change the z-index to give a slide show effect.
e.g:
.
.
<asp:repeater id="myRepeater" runat="server" ....="" style="position: relative" xmlns:asp="#unknown">
.
.
.
<itemtemplate>
<uc1:[yourusercontrol]>
now use a javascript to get hold of the inner contents and change the zIndex attribute value.
Let me know if you need sample code.
Regards,
Cybernate
|
|
|
|
|
string str = "009810";
int _zip = Convert.ToInt32(str);
Now i am getting result as 9810. But i need it as 009810.
How can i get this? how can i convert this string to integer
G. Satish
|
|
|
|
|
You cannot store an integer value with a leading zero...Actually why do you want to do that?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
modified on Tuesday, March 24, 2009 1:59 AM
|
|
|
|
|
Actually my string will be like this...
Mainstring = "009816-9234";
I am splitting this and taking part in to integer and add one value to it and then send as parameter to a query to check this in database.
i.e string str = "009816";
_zip = Convert.ToInt32(str);
_zip = _zip + 1;
ProcessthisinQuery(_Zip)
{
}
G. Satish
|
|
|
|
|
so how come it makes a difference ... i mean _zip now contains 9817. Whether 0009817 or 9817 both refer to a same value...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
No, both are not same....
When i query like this...
Select * from Table Where Zip = '009817' Which gives results
But when i use the same query with zip = '9817'
Select * from Table Where Zip = '9817' Which doen't gives any results
The Data in the column contains with zip as 009817. So second query doen;t match
G. Satish
|
|
|
|
|
Ok got it...the zip column in your table is a non integer column like varchar or nchar etc. So when you pass '9817' its recognized as 9817 text not as 009817 and hence you are not getting the desired result.
For your problem after
_zip = _zip + 1;
Convert the _zip back to a string and pass it to the query... i mean
use the following...
-zip.ToString("000000") gives the value 009817. Now pass this value to your ProcessQuery(string zip) method as a string value.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Thank you for your answer, and have another doubt that the value is dynamic, i dont know, how many zeros will be in starting of the string..
Whether it will be '09817', '009817', '000817', '00081'
G. Satish
|
|
|
|
|
For that instead of using ToString("000000") use -zip.ToString().PadLeft(length,'0') ...where length can be the required number of digits...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Thank you very much. Its working fine
G. Satish
|
|
|
|
|
Glad to help you
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
hai,
i am using two textboxes for entering countrycode,country name,
entering some datas,i checked the existancy in database,In button click existancy checking is ok
but one problem is we use the spacebar first then inserting the duplicate data(using c#,asp.net)
for Ex:
suppose we insert the data india,ind12 using textboxes
after that we connot this insertion
here spacebar using infront of the insertion india, ind12
again inserting the duplicate data? how can we avoide this? help me
|
|
|
|
|
Trim those Textbox Values
Ex: TextBox1.Text.Trim
while inserting those values and Checking for Duplicate Data.
|
|
|
|
|
objCity.pvar_City_Name = this.txtCityName.Text.Trim().ToUpper(); objCity.pvar_City_Code = this.txtCityCode.Text.Trim().ToUpper();
i used this code, i cannot get again insert duplicate data
|
|
|
|
|
Hi guys, i have encountered a problem in finding control.
i have binded data to a label in a datalist to retreive a email and it works. but next, i have a new label by the name of "Testing". How do i grab the bound data from the label to put into a string? i have tried findcontrol. from finding first the datalist then the label control, and directly findcontrol for the label and it still doesnt work. guidance needed!!
Below will be the code i have on hand:
Part of the source code will be like
<asp:label id="Label1" runat="server" text="<%#Eval(" fullname")%>"="" xmlns:asp="#unknown">
How do i grab the eval email value and put to a string? Kindly please help, thanks guys
|
|
|
|