Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Is there anyway to request cookies from a component file. I'm using 3 cookies to verify certain things every time the user opens a new webform. It works great but currently I have to add that routine to every webform I add. Is there a way to put the routine in a component file so all I have to do is create a new instance and call the routine
  • *Experts*
Posted

If you don't need an instance of a class to use the method, you

can call it as a shared (static in C#) method of a class. Add a new

class to your project, and add the method as Public Shared

(public static in C#), then you can call it anywhere in your project

by using ClassName.MethodName().

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted

A way of using "Global Routines" Finally!!! But I'm still having trouble with the cookies. I keep getting this error

 

Request is not available in this context

Posted

I think I also face the same problem as you.

 

As what I understand, Cookies is available only for Web Application. So my other tiers which using VB or C# developed can't access Cookies...

 

If I inherit it as what Web Form does, logically it should work. But then it is meaningless for my tiers, because it should independent...

 

So please let you know if you got solution.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...