将数据列表视图中显示的标签数据传输到.cs页面. [英] transfer data of label displayed in DataList View to the .cs page.

查看:104
本文介绍了将数据列表视图中显示的标签数据传输到.cs页面.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想要将数据列表视图中显示的数据传输到.cs文件.是否可以?

我正在尝试建立fb状态注释框并需要帮助.
-> i已创建两个表"STATUS".和"COMMENT".
-> STATUS表包含``uid'',``status'',``st_id'',其中COMMENT表包含``uid'',``comment'',``st_id_fk''.
->当我登录时,将为该用户uid选择所有st_id.我已将其存储在字符串"string [] a =新字符串[50]"中.
->但是现在我必须分别调用每个st_id,然后从COMMENT表中选择注释.
->我该怎么办?
需要尽快提交我的项目,请帮助我..

want to tranfer data displaying in datalist view to the .cs file.. Is it possible or not?

i am trying to build fb status-comment box and need help.
->i have created two tables "STATUS" and "COMMENT".
->STATUS table contains ''uid'',''status'',''st_id'' where COMMENT table contains ''uid'',''comment'',''st_id_fk''.
->when i login then all st_id are selected for that user uid. which i have stored in string "string[] a = new string[50]".
->but now i have to call every st_id individually and select comment from the COMMENT table.
-> How can i do so?
Need to submit my project soon please help me..

推荐答案

你好naveen,
这是为您提供的解决方案:
1)
Arraylist tempArraylist =新的Arraylist();
将所选uid的st_id添加到tempArraylist中,而不是将其添加到字符串数组中.
2)现在,请注意针对该特定st_id的注释,为
foreach(tempArraylist中的对象obj)
{
//查找针对该obj的评论,即st_id
}

----问候
Pavanraje
Hello naveen,
Here is solution for you:
1)
Arraylist tempArraylist=new Arraylist();
Add st_id for selected uid into tempArraylist instead of adding it into string array.

2) Now look out for comment against that particular st_id as
foreach (object obj in tempArraylist)
{
//lookout for the comments against that obj i.e st_id
}

---- Regards
Pavanraje


感谢4了解我的问题Pavanraje ...

但是我的问题是我必须在数据列表视图中的每个Status(st_id)下面都包含唯一的用户ID的所有注释.

您的答案是正确的,但我无法在数据列表视图中显示该结果.
我是ASP.NET的新手,所以请帮我解决它.

例如.
如果用户1登录,则
->在数据列表视图中选择了所有st_id(例如3、4、5)以及状态.
->然后对于st_id = 3我必须从COMMENT表中选择所有注释
与st_id 4和5类似.

我的问题
1. st_id对于每个userId始终是动态的,那么如何为数据列表中的每个动态st_id调用COMMENT表?
2.数据列表视图如何在运行时获取动态值?
thanx 4 understanding my problem Pavanraje...

but my problem is that i have to take all Comments below every Status(st_id) for unique user ID in datalist view.

your answer is correct but i can not make that display in datalist view.
i am new in ASP.NET so plzz help me to solve it.

for ex..
if user 1 log in then
-> all st_id (for eg. 3,4,5) along with status are selected in datalist view.
-> then for st_id = 3 i have to select all comments from COMMENT table
simillarly for st_id 4 and 5.

my problem
1. st_id are always dynamic for every userId then how to call COMMENT table for every dynamic st_id in datalist?
2. how datalist view can take dynamic values at run time?


这篇关于将数据列表视图中显示的标签数据传输到.cs页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆