|
How are you going to track that totally depends on your strategy and business requirement? But stating from the basic, you can probably create a column called "viewcount" on any of the table where you are storing all articles. In the page load and under if(!IsPostBack) just write down the code to update the "viewcount" flag by 1. Just a basic idea which may help you.
Regards
Saanj
There is no foolish question, there is no final answer...
|
|
|
|
|
You could always use something like Google Analytics - It takes a few minutes to set up as it just requires that you add some javascript to your page.
Alternatively, you probably want to create a database table and each time you have to render a news article INSERT a row in the database to say what article was rendered and any other information you want to store with that (e.g. a date/time, the UrlReferrer, etc. etc.)
To get the most visited articles all you need to do is count each time an article appears in the database.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Hi all,
I want to redirect the page after alert box is clicked . but the page redirects before the alert was called Wat to do..
|
|
|
|
|
can you paste the code that is redirecting the page and displaying alert
|
|
|
|
|
You should use javascript,fire function name from your control.
function ShowAlert()
{
alert('You will redirect in another page');
window.open(' yoururladdress/pagename.aspx');
}
onclick="ShowAlert()"
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
This is wat i used but the page is redirected without waiting for alert box.
|
|
|
|
|
Which control you are using to redirect in another page?
If you are using button then use property
OnClientClick="ShowAlert(); return false;"
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
I have validation one the control.Now validation is not working..
|
|
|
|
|
Your core problem is that you think we're mind readers. Your code is broken. We can't fix it without seeing it.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
This is the code at client side
function changed() {
alert('Password changed successfully');
window.open("UserProfile.aspx");
return false;
}
I called it at the server side as
Page.RegisterStartupScript("Error", "<script>changed()</script>");
Response.Redirect("UserProfile.aspx");
inside the click event of the button.That button will cause validation also.
My problem is the page is redirected before alert is clicked.
|
|
|
|
|
According to me, the code should redirect to Default.aspx not UserProfile.aspx.
In server side code, you register the client script block and then you redirected it to Default.aspx. You comment the Response.Redirect, it will start redirecting to UserProfile Page
|
|
|
|
|
Yes, that's always going to be the case - why don't you put your redirection into the javascript function as well...
|
|
|
|
|
anu_anu wrote: Page.RegisterStartupScript("Error", "changed()");
This injects script into the page.
anu_anu wrote: Response.Redirect("UserProfile.aspx");
This redirects, so that your page is never rendered.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Post the code which you are using. Code shared by Blue Boy should definitely work.
There is no foolish question, there is no final answer...
|
|
|
|
|
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ci As CultureInfo
If Not Page.IsPostBack Then
'Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
'get the culture info to set the language
rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))--------------> error here
"Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified."
ci = Thread.CurrentThread.CurrentCulture
LoadStrings(ci)
End If
End Sub
|
|
|
|
|
What makes you think that an assembly of that name exists ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
When I retrieve an image from sql database in the grid view I had the following (System.Byte[]) instead the image. What is the problem?
Thank you
|
|
|
|
|
You are not displaying images correctly.
Check this link[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
|
y_mmohd wrote: When I retrieve an image from sql database in the grid view I had the following (System.Byte[]) instead the image.
Where are you getting the error? Is there any thing problem with byte conversion ?
Have a look into this article, This is another way to show image from database to gridview. Displaying Image in Gridview from Database
Here you have to store image path in the database rather than the image. Image will store in your hard drive.
|
|
|
|
|
Check out Links
http://www.odetocode.com/Articles/172.aspx[^]
http://aspalliance.com/140[^]
|
|
|
|
|
Thanks you for being Helpful,
I need your advice I want to create a web site for shopping online. The customers can upload their images to the web.
What is the best solution for this:
1- To store the image inside the table in the sql server.
2- Or to store the images inside a folder in the web.
|
|
|
|
|
Hi all,
I want to use google local search in my website. I have displayed google
local serach using the javascript API. Google has provided a search control
we just need to set some properties,send the sesarch query and google return
result a control on a page. When we use google local search Javascript API
a search textbox a button is displayed on web site. I dont want to use that button
i want to use button and textbox which is already in my website.
Second thing is that when google return the result i want to read the
result because i want to insert the data in database when user click on a button beside
the search result. How can i read the result returned by google.
Please help me to solve this?
Ex : url maps.google.com
open the above url and enter newyork,pune india and hit search button it
will retun some set of result and i want to read all the data.
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi to all in my grid i bind my short news...,
In my mouseover event i want of the short news i need the brief news in modal popup/ anyother way...,
what i need is exactly like this :
plz look at this link "Top Business feeds from across the web" section
http://www.in.com/news/business-news.html
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|