Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

Dilip H Patel

@Dilip H Patel
About
Posts
7
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with custom attribute
    D Dilip H Patel

    Dear All, I have created a custom attribute class in app_code as: [System.AttributeUsage(System.AttributeTargets.Class,AllowMultiple=false)] public class Arrtib : System.Attribute { public Arrtib() { if (HttpContext.Current.Session["UserId"] == null) { HttpContext.Current.Server.Transfer("~/Login.aspx"); } } } And i have used this attribute as follows. [Arrtib] public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } the basic idea behind that is "if user is not log in then request for this page (default.aspx) will redirect to login page." this works fine in when we request default.aspx first time. but after login and once accessing the default.aspx page and then log off. (in log of i have cleared the session.) now if we request for the same page it should call the custom attribute constructor and redirected to login page. BUT..... ya BUT attribute constructor is not executing. Try to help for this problem. Thanks in Advance.

    ASP.NET help design sysadmin

  • fck editor server404 problem
    D Dilip H Patel

    Dear, This is very common problem with fck editor. it takes few seconds to load and meanwhile if you request for another page(by clicking another link) this problem will occur. so, let it take time for few seconds then this problem will not happen. Regards, Dilip Patel Ahmedabad

    ASP.NET help csharp html asp-net dotnet

  • Reading from excel file.
    D Dilip H Patel

    Hi Hemant, I think that you are filling the datatable directly from the excel. and your first value in excel is numeric. that's why this problem is occured. Try this one. first you create columns of datatable, which you want to fill. make sure that column's datatype is string. and then try to fill it. Regards, Dilip Patel

    ASP.NET help database tutorial question

  • Handling browser(<--) and (-->) buttons
    D Dilip H Patel

    Hi Shekhar, Dilip Here. In such situations, why don't you use window.histoty.delete. But i am suggesting to use C# backcode to handle such situations. when user log in, you would store his userid in session. when user log out you would delete userid from session. when user passes any request (either with browser back button or giving url in addressbar), you can check in page load event whether user is loggin or not. if not than you can redirect page to login page Regards Dilip Patel

    ASP.NET csharp javascript design sysadmin tools

  • pls help restricting multiple logon to an application with single user account.
    D Dilip H Patel

    Hi Surender, Dilip Here again, sorry for late response, i was busy.... so your problem is as [1] if a user logs in and closes bowser close button instead of log out. ==> if user is log in and close browser then you can call a javascript function on body's(HTML tag) unload event and in that function you can all a server side function which will perform logout procedure. for that you can use ICallback interface or you can use XMLHttpRequest. [2] if a user logs in and leaves doing nothing ==> in such situations, your session will be expired. and when session expires, you can do coding of logout in session_end event. OK, May my suggesions helpful to you. Regards Dilip Patel

    ASP.NET database help announcement

  • sql query for dropdownlist
    D Dilip H Patel

    Dear .netman, first of all you can not use aggregate functions (like sum, avg) without using Group by clause. and another thing also you can not use aggregate functions in where clause. you have to use Having clause with group by clause. select * from table where field1 not in (select field2 from table2 where field3 like '%05/09/2008%' gruop by field2 having sum (field3) < 1) Regards, Dilip Patel

    ASP.NET database question

  • How to restrict multiple logon to an application?
    D Dilip H Patel

    there are several ways to doing this. some are as follows [1]==> you should have create array(table, array list) of all login users and stored in application object. when new user will login, then first what you have to do is check if the user id exist in application object. if yes then, restrict him. when user log out then delete entry from application object. [2]==> you should make a boolean field in user master table in your database. when use login then set it true. and when user log off set it to false. make sure every login time that in database this field for that user set to false. Regards, Dilip Patel Sr. Software Engineer (.Net).

    ASP.NET help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups