|
Thanks for the reply.
I tried ur solution but it is not affecting on menu control performance.
i think it is not problem of data store.Beacause it is working fine in IE 6.0,problem is in Ie 7.0.
So do u have any another solution? please reply
|
|
|
|
|
hi all i need to swap two rows(move rows up and down) using a link button in repeater control any samples how to do..
sorry for cross post...
|
|
|
|
|
One way,You catch the event of link button in ItemCommand,update the datasource according to you need and then bind it again.
Use AJAX so that your whole wont refresh.
Cheers!!
Brij
|
|
|
|
|
|
madhukk wrote: im working on asp.net1.1
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
No issues!!
then let the page refreshed..
but you can use that model
Cheers!!
Brij
|
|
|
|
|
I wanna counter with ASP.net ( C# Coding ) for my website that gives me
1:
Yesterday Visitors
2:
Today Visitors
3:
Online Visitors
4:
Total Visitors
I have seen this site
http:
but ....
I can only have Total Visitors
Please Help !!!!!!
|
|
|
|
|
|
U have already posted the same question.. please dont cross post... You wont get replies for cross post....
Regards,
Tash
|
|
|
|
|
I dont Know This is Cross Post..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
What do you mean
write a logic in the session start event and compare with datetime..!
and store it in database..!
But I didnt get my ans
Yesterday Visitors
Today visitors
Online Visitors
Total Visitors
|
|
|
|
|
Thats okay.. If u have an answer u can help him out.. Mostly people dont reply for cross posts... anyways opinions vary..
Regards,
Tash
|
|
|
|
|
Thanks a lottttt
How can i do that
write a logic in the session start event and compare with datetime..!
and store it in database..!
I wanna :
Yesterday Visitors
Today visitors
Online Visitors
Total Visitors
modified on Tuesday, January 12, 2010 4:52 AM
|
|
|
|
|
Actually a website runs all the time. It doesnt restarts.
So you need to calculate Yesterday visitor/ today Visitor manually by checking the DateTime
Also Online visitor can be calculated by fixing a timeout and check all the last requests made during this timeout value.
|
|
|
|
|
Thanks anyway but
Can you give me example or code .
I should finish my project for this Wednesday .
So please give me code or pdf or C# example .
<code>Step by Step code </code>.
Thanksss
|
|
|
|
|
create table in database
CREATE TABLE [ApplicationCount1] (
[HitID] [bigint] IDENTITY (1, 1) NOT NULL ,
[AddedDate] [datetime] NULL ,
[HitCount] [bigint] NULL ,
) ON [PRIMARY]
GO
Create Procedure to Add Hit
alter procedure usp_Hit1
as
declare @CurrentID bigint
declare @AddedDate datetime
set @CurrentID=0
set @AddedDate=CONVERT(char(12), GETDATE(), 101)
Select @CurrentID=HitID from ApplicationCount1 where Addeddate=@AddedDate
if @CurrentID>0
update ApplicationCount1 Set HitCount=HitCount+1 where HitId=@CurrentID
else
insert into ApplicationCount1 values(CONVERT(char(12), GETDATE(), 101),1)
Now on Session Start Call This Procedure now in database u have datewise count now u can use it to display number of hit for any day
|
|
|
|
|
Thanks a lot no no
thanks more than a lot.
|
|
|
|
|
How Can I get DateTime.Today on Server which my website is on it?
|
|
|
|
|
jojoba2010 wrote: How Can I get DateTime.Today on Server which my website is on it?
System.DateTime.Now
It returns server time..!
If u want Client time Use javascript..!
This is a basic question first before posting here search it in google..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Infact DateTime.Today returns your server Date.
|
|
|
|
|
System.DateTime.Now
System.DateTime.UtcNow
System.DateTime.Today
Which do you want to get??
But you should know how to change local time to utc time and utc time to local time.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:59am.
|
|
|
|
|
You can use:
System.DateTime.Now
It returns Server time.
modified 27-May-14 4:55am.
|
|
|
|
|
Hi All ,
How to close session if user close the brower.
And my second question is if session timeout happens
then session end method is called from in Global.asax
how to do the redirection from the Global.asax
Thanks and regards,
Amit Patel
|
|
|
|
|
Do following thing :
create on button on you page, put it in one div and make div display as none ( button id btnLogout) attach server side event ex. name LogoutUser
attach event in the body tag of form
onunload="doUnload()"
write following script
call server side event
function doUnload()
{
if (window.event.clientX < 0 && window.event.clientY < 0)
{
alert("Window is closing...");
//calling button click event
document.getElementById('btnLogout').click();
//btnlogout is client id so if ur not getting than use //btnlobout.ClientId of .net of server side code
}
}
sever side code
protected void LogoutUser(object sender, EventArgs e)
{
//code to logout user
// server abandon
}
modified on Tuesday, January 12, 2010 1:56 AM
|
|
|
|
|
Amit Patel1985 wrote: How to close session if user close the brower.
You cannot do that. If a user closes the browser, the session automatically expires at it SessionTimeout (20 minutes is the default Timeout). But you can still achieve it, I have seen code to call function on closing the browser. You are search it on google. JavaScript "unload" event fires whenever you go off that page. "unload" event will not help you.
Amit Patel1985 wrote: And my second question is if session timeout happens
then session end method is called from in Global.asax
how to do the redirection from the Global.asax
What do you meant by redirection? Global.asax is not page, that you need to redirect from.
|
|
|
|