使用cookie值加载gridview(Load gridview using a cookie value)

   IT问题网   2021-02-18 00:00:00

问 题

我有一种方法可以根据cookie中的值加载gridview。

现在它没有加载。请帮我这个饼干



 response.cookies ["  selecteddatecookie"]。value = datepicker.text; 
response.cookies [" selecteddatecookie"]。expires = datetime.now.addminutes( 10 );
string selecteddate = response.cookies [" selecteddatecookie"]值。
datatable dtable = new datatable();
systembusinesslayer = new businesslayer();
dtable = systembusinesslayer.getallappointmentsfortoday(selecteddate);
grvviewappointments.datasource = dtable;
grvviewappointments.databind();

解决方案

你可以做一件事,首先检查cookie是否为null null使用if条件,然后将cookie值分配给某个变量,然后像你在编码中那样传递变量,

标签:使用加载



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

只有添加足够的行才能启用垂直滚动条,才会显示ClistBox(ClistBox doesn't display until enough lines are added to enable the vertical scroll bar)

problem i have an application that adds lines to a list b ...

DateTime数据类型的算术运算。(Arithmetic Operations on DateTime Datatype.)

problem hi, i have been trying to find a way to do arit ...

将图像插入Word(Insert Image to Word)

problem how to compress inserted image in word using dsof ...

我如何缩进给定的XML(how can i indent a given XML)

problem is there any easiest way to indent given xml i ...

我想将Outlook消息保存到sql server db(i want to save outlook messages to sql server db)

problem hi could you please help me on saving outlook m ...

我如何在cookie中保存令牌(how I can save the token in the cookie)

problem hi, i am creating the web service au ...

C#.net中的ModalPopupExtender(ModalPopupExtender in C#.net)

problem while i am clicking the modal popup extender wind ...

需要帮助来更改密码表格(need help to change password form)

problem hi everyone, i am still newbie in vb. ...

CMap或CMapPtrToPtr(CMap or CMapPtrToPtr)

problem hi, i want store the objects in cmap ...

如何创建新的任务栏(how to create new task bar)

problem hi, i want to create new taskbar,can any one hel ...

在C#.net中旋转PDF文件(Rotate PDF File in C#.net)

problem hi , how to rotate pdf file in c#.net ...

在C#.Net中旋转图像文件(Rotate Image Files in C#.Net)

problem hi, how to rotate image files(jpeg,ti ...

如何交换字符串中的字符(how to swap characters in a string)

problem hi all. i''m new in .net and i want t ...

如何在SHAREPOINT 2010中集成twitter(How to integrate twitter in SHAREPOINT 2010)

problem hi to all, this is siddiqali working ...

检查应用程序是否正在运行(Check If Application Is Running)

problem is there a way to run a loop that wou ...

如何使用radiobuttonlist?(how to use radiobuttonlist)

problem i want to write select query for selectedindexcha ...

如何计算日期差异和数字差异(How to Calculate Date Diff And Num Diff)

problem glnotranscationdate deposit withdraw transid loan ...

ie6浏览器问题在我的网页上(ie6 browser issue in my web page)

problem my webpage displaying 1 inleft bottom corner only ...

无法在表单上使用控件。(Unable to use controls on the form.)

problem hi, i have created some static insta ...

如何在Javascript中使用正则表达式匹配定义的模式(How to match defined pattern using regular expression in Javascript)

problem hi, first, there is a string called: var bookpat ...