Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem to use letters ( c: , d:) with the physical drive: Pin
Henry Minute13-Jun-10 8:14
Henry Minute13-Jun-10 8:14 
AnswerRe: Problem to use letters ( c: , d:) with the physical drive: Pin
Luc Pattyn13-Jun-10 8:21
sitebuilderLuc Pattyn13-Jun-10 8:21 
QuestionConnection string Pin
humayunlalzad13-Jun-10 3:01
humayunlalzad13-Jun-10 3:01 
AnswerRe: Connection string Pin
Abhinav S13-Jun-10 3:27
Abhinav S13-Jun-10 3:27 
GeneralRe: Connection string Pin
humayunlalzad13-Jun-10 3:51
humayunlalzad13-Jun-10 3:51 
Questioncrystal report and list<> Pin
reza assar12-Jun-10 21:39
reza assar12-Jun-10 21:39 
AnswerRe: crystal report and list Pin
Mycroft Holmes13-Jun-10 19:55
professionalMycroft Holmes13-Jun-10 19:55 
QuestionNeed to add 1 to a cache value Pin
Randall Hall12-Jun-10 18:07
Randall Hall12-Jun-10 18:07 
I have a label called lblsite that I'm trying to give a value from a cached value.

protected void Page_Load(object sender, System.EventArgs e)<br />
    {<br />
        lblsite.Text = (Cache("locid") + 1);<br />
    } 

The "locid" is set on the previous page.

protected void btnaddaddress_Click(object sender, System.EventArgs e)<br />
    {<br />
       Cache["locid"] = gvaddressmax.SelectedRow.Cells[0].Text;<br />
       Response.Redirect("btnaddaddress.aspx");<br />
    }            


However, the lblsite.Text = (Cache("locid") + 1); gives me the following error and results in a null value.

'System.Web.Caching.Cache' is a Type, but being used like a variable

How can I get this to work?
AnswerRe: Need to add 1 to a cache value Pin
Dan Mos12-Jun-10 18:21
Dan Mos12-Jun-10 18:21 
AnswerRe: Need to add 1 to a cache value Pin
Pete O'Hanlon13-Jun-10 4:44
mvePete O'Hanlon13-Jun-10 4:44 
QuestionTab Control with Exit Button Pin
royk12312-Jun-10 10:04
royk12312-Jun-10 10:04 
AnswerRe: Tab Control with Exit Button Pin
Dan Mos12-Jun-10 16:18
Dan Mos12-Jun-10 16:18 
GeneralRe: Tab Control with Exit Button Pin
royk12313-Jun-10 2:09
royk12313-Jun-10 2:09 
AnswerRe: Tab Control with Exit Button Pin
Amar Chaudhary12-Jun-10 17:09
Amar Chaudhary12-Jun-10 17:09 
QuestionSetting Datagridview combobox column value to null. Pin
priyamtheone12-Jun-10 6:14
priyamtheone12-Jun-10 6:14 
AnswerRe: Setting Datagridview combobox column value to null. Pin
Mycroft Holmes12-Jun-10 15:53
professionalMycroft Holmes12-Jun-10 15:53 
AnswerRe: Setting Datagridview combobox column value to null. [modified] Pin
priyamtheone14-Jun-10 5:43
priyamtheone14-Jun-10 5:43 
GeneralRe: Setting Datagridview combobox column value to null. Pin
Mycroft Holmes14-Jun-10 12:10
professionalMycroft Holmes14-Jun-10 12:10 
QuestionAccessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 4:09
Smith#12-Jun-10 4:09 
AnswerRe: Accessing CheckBox on row in Datagridview Pin
dan!sh 12-Jun-10 4:25
professional dan!sh 12-Jun-10 4:25 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 4:49
Smith#12-Jun-10 4:49 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Luc Pattyn12-Jun-10 5:01
sitebuilderLuc Pattyn12-Jun-10 5:01 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Smith#12-Jun-10 5:24
Smith#12-Jun-10 5:24 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
Luc Pattyn12-Jun-10 5:40
sitebuilderLuc Pattyn12-Jun-10 5:40 
GeneralRe: Accessing CheckBox on row in Datagridview Pin
dan!sh 12-Jun-10 5:07
professional dan!sh 12-Jun-10 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.