|
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.
|
|
|
|
|
Please give me some idea to grab the contacts from myspace,Linkedin account.
|
|
|
|
|
|
Need to develop web application to grab the contacts from Facebook,gamil,myspace...site if the userID and password is given in application.
|
|
|
|
|
Then You need to develop for each application..!
If you want to make your work more easy..!try any third party provider is available or not..!but i am not sure abt the third party provider..!
but try to look at this link you can have an idea..!
http://openinviter.com/index.php[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hi thanks for your reply..
Need to develop web application to grab the contacts from Facebook,gamil,myspace...site if the userID and password is given in application.
Thanks
Kokila
|
|
|
|
|
Thanks. Third party tools are available for this but i want to do it by own.. as you said i have to develop one for each site..
searching for the API or code to implement it. Till now i dint get any solution for this. So i posted here..
Thanks for your help..
Kokila
|
|
|
|
|
You would need to check with each vendor's API for the same and consume the same towards getting the data.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Hi experts
I have designed my page to allow users to upload excel/csv files and I am interested to capture the data from only few columns of these files. The column names of the files varies from user to user hence i created the form to obtain the column names of user's file for mapping to my database. Now my requirement is that I want to first read the column names of uploaded file and retain only columns and data which are matching to the user entered column names for mapping.
clues or guidance solicited preferably in vb.net
thanks in advance
kris
|
|
|
|
|
Do following code you can read all data in datatable which easily fill you requirement
FileInfo fileinfo = new FileInfo(filePath);
string strSql = "SELECT * FROM [" + fileinfo.Name + "]";
string strCSVConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileinfo.Directory.FullName + ";" + "Extended Properties='text;HDR=No;'";
OleDbDataAdapter oleda = new OleDbDataAdapter(strSql, strCSVConnString);
DataTable dtbCSV = new DataTable();
oleda.Fill(dtbCSV);
|
|
|
|
|
Hi pranay
thanks for response. what you explained is all about connection and fetching data to data table which is ok. My actual requirement starts there after. I would like to explain the requirements stepwise here
1.Establishing connection to db and populating data table
2.Reading the column names of the data table and retaining only columns and data which user has specified as mapping fields in page, which too may not be in sequence.
3.Adding few more columns dynamically to data table with default values
4.finally binding data to grid for user editing and final saving to db
thanks
kris
|
|
|
|
|
In that case I think first row in csv file must be name of columns.
So for that read csv file in the data table.
Than create you dynamic table by looping through fist row of your data table and create one dynamic datatable in between that by comparing selected row.
Than loop through other rows similar fashion and read whole file and insert data row in datatable created by you.
I hope that this will work for you.
|
|
|
|
|
Hi, I have a time series information on stock market that includes 4 columns: Dates, StockTicker, Price, and Volume. My original goal was to try writing SQL query statement to retrieve stocks that demonstrate certain price and volume patterns on a given date, but then found it a bit hard to do so due to my limited skill on constructing SQL query statement.
One of my friends who's good at programming suggests that it would be easier for me to retrieve source data into a DataTable/DataSet and then process them from there. However, I'm not sure whether this is as efficient as SQL, if it oculd be done in SQL that is.
Here's the type of pattern I'd like to check in my stock table:
1. Given 2 specific dates, retrieve all stocks that show (Price of earlier date) > (Price of later date) AND (Volume of earlier date) < (Volume of later date).
2. Stocks that fulfill condition 1 and that price is within a certain range. Or condition 1 and that volume is within a certain range.
Regarding information retrieval, I thought it's always more efficient to do in SQL, especially if you have a lot of variables and don't know what you're looking for.
I'd greatly appreciate for any suggestions! Thanks!
|
|
|
|
|
You would be filling the Dataset/DataTable from the SQL only. It is not wise to get entire source in DataSet and then filter out what you need. This is what you should do, IMO:
1. Fill the dataset through your SQL command (including the where clause).
2. Use the datas created to display, insert or update data.
Also, if you just need one time access to the data, use DataReader.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
hi all ,
i want to know To Access Label Inside GridView where GridView Inside Datalist By Client side
who can help me plz? im worried
|
|
|
|