It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
When I refresh the page, page count does not increase. It is kept in session or any way. For example, in SO, I clicked any qouestion, question view count increase. And I return that question again after look another it is not increase.
What is the logic? And Sorry my poor english. I hope I can explain. I dont know correct tag for this question too.
Thanks.
You may check the IPAddress of the request coming from and check it. If A request already came (page view) from this IP for this page, then do not increase the count, else increase.
If you store it in session it can be hacked by different browsers. Ex: If i open the page in 3 different browsers ,the count will be increased 3 numbers. So do not use Session for that.
You can have a table to do that. Have a QuestionId, IPAddress, DateVisited columns. It is up to you to decide whether the visit should be counted if user visit on a different day from the Same IP for same question . Since you have the data in table, you can do the IF condition as per your wish.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
how can I get how many people registered to my website?
in ASP.NET
You're not going to get much better then incrementing in Session_Start and decrementing in Session_End unless you use some other means such as a database.
When you are authenticating your requests you could update a timestamp in the database to show that the user has been active, and after a given time (say 10-15 minutes), the query thatcollects the number of current users ignores that row in the database (thus decrementing the count).
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a sql query that should return results for user text (Like free text search)which can be a single character or word or combination of words.
For example if I have column named "subject" and its value is Very long test, then I want a query that can give result if I put test or t or `e'in the query below
select Subject from [dbo].[Email] where Contains(Subject,'%usertext%')
I tried handling in code behind and then sending it to the query as parameter.
am editing this question because of so many down votes. Please if you dont understand the question simply comment so I can try to ask more clearly. That would be helping me.
You don't need the % character, since the function Contains already implied that.
So :
select Subject from [dbo].[Email] where Contains(Subject,'t')
The % are for LIKE function
select Subject from [dbo].[Email] where Subject LIKE '%t%'
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I know I can limit a user to a particular profile, but as a subset of that, can I limit them to a date range without having to create a new tracking number? i.e. I want the client to see 12/1/11->1/1/12 ONLY.
Not if you're giving them access to the Google Analytics reporting interface.
You could implement this yourself by building a client-facing reporting interface via the Google Analytics API, but it'd be a lot of work.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
well i have a table my boss has made... they are 2 tables..
first where products are going to be has
(table A)
idinvoice (since table B)
idpruduct
description (it is the name of product)
quantity
unitPrice
TotalPrice
another table (i am going to call it table B)
idinvoice
date
deadline
type
idclient
saler (i consider it is sooo bad)
street
transport
status
Total
why do i believe it is bad?
because first the client is going to choose the product (but it doesn't have a idinvoice)
i have never made something as this, only on windows form, but i have never built a online point sale,
how tables do you believe I must to have? (what columns)
You need three tables. They might be something like:
Product: idpruduct, description (it is the name of product), unitPrice
Client: idclient, street
Invoice: idinvoice, idclient, saler, plus everything else related to a shipment or sale of one or more products.
You might also want:
Saler, or salesman: name, idnumber (perhaps idclient, too)
Does this sound close to correct, to start with?
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I create an one webpage in asp.net all the time i am facing the following pbm how to rectify it..
if(ds.Tables[0].Rows.Count > 0)
Maybe you need to check that ds.Tables[0] exists first
If you are constantly checking on your pages to see if that dataset has a table with rows, I would think you would want to make some helper class to check that your dataset is not null, and that whatever tables have actual rows. Also you might want to think about moving these to typed datasets.