Geeks With Blogs
Shashi Kumar July 2014 Entries
Count Number of Visitors to Website in C#
Here I will explain how to count number of visitors to a website in using C# open Global.asax file and write the code as shown below1234567891011121314void Application_Start(object sender, EventArgs e){Application["VisitorCount"] = 0;} void Session_Start(object sender, EventArgs e){Application["VisitorCount"] = (int)Application["VisitorCo... + 1;} void Session_End(object sender, EventArgs e){Application["VisitorCount"] = (int)Application["VisitorCo... - 1;}Now open your aspx page in which ......

Posted On Thursday, July 31, 2014 5:14 AM

FileUpload not working within update panel
File Upload will not work with a partial post back. So it will not work when placed inside update panel.So to make it work within an update panel we can use sessions and save the path on file upload completed event.The best way is to use PostBackTrigger which will make file upload to work inside an update panel as below.<div> <asp:FileUpload ID="FileUpload1" runat="server" /> <asp:Button ID="SubmitButton" runat="server" Text="Submit File" OnClick=SubmitButton_Click /> <asp:UpdatePanel ......

Posted On Thursday, July 31, 2014 5:13 AM

Copyright © Shashi Kumar | Powered by: