i want to do a comment box when i write something there, the people also comment it under my comment. How can i do it ? if i use 2 Repeater i couldn't find hiddenfild value.. My sql table is like this
MyComment TABLE
MyCommentID
Comment
Date
Friends Comment TABLE
FriendsCommentID
MyCommentID
Comment
Date
i think it should be MyCommentID = @MyCommentID
but i couldn't solve the C# and html codes. Please help me.
It should be doable with two repeaters. Do you have them side-by-side, or one nested inside the ItemTemplate of the other?
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
I guess you have the trouble in accessing HiddenField in the parent Repeater control, when you need to use it to set the datasource for inner one ("i couldn't find hiddenfild value"). If so, you need to access the RepeaterItem of the parent Repeater first,
then call FindControl() method to get the HiddenField. Try this:
RepeaterItem ri = (RepeaterItem)(sender.Parent);
HiddenField hf = (HiddenField)ri.FindControl("HiddenField1");
If I misunderstand, please describe the problem clearly with some source code.
Raedon
0 Points
5 Posts
Data insert and show problem. (Like a chat box)
Aug 03, 2012 12:30 PM|LINK
Hi huys
i want to do a comment box when i write something there, the people also comment it under my comment. How can i do it ? if i use 2 Repeater i couldn't find hiddenfild value.. My sql table is like this
MyComment TABLE
MyCommentID
Comment
Date
Friends Comment TABLE
FriendsCommentID
MyCommentID
Comment
Date
i think it should be MyCommentID = @MyCommentID
but i couldn't solve the C# and html codes. Please help me.
Thank you guys
vinz
All-Star
127087 Points
17946 Posts
MVP
Re: Data insert and show problem. (Like a chat box)
Aug 03, 2012 12:36 PM|LINK
Check these links:
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
Raedon
0 Points
5 Posts
Re: Data insert and show problem. (Like a chat box)
Aug 03, 2012 01:43 PM|LINK
i gonna check them. I hope they will help to solve my problem. Thank you so much
Raedon
0 Points
5 Posts
Re: Data insert and show problem. (Like a chat box)
Aug 03, 2012 04:01 PM|LINK
my problem still continue..
superguppie
All-Star
48225 Points
8679 Posts
Re: Data insert and show problem. (Like a chat box)
Aug 06, 2012 08:52 AM|LINK
It should be doable with two repeaters. Do you have them side-by-side, or one nested inside the ItemTemplate of the other?
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
vinz
All-Star
127087 Points
17946 Posts
MVP
Re: Data insert and show problem. (Like a chat box)
Aug 06, 2012 10:56 AM|LINK
What's the problem? could you please specify? what have you tried?
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Data insert and show problem. (Like a chat box)
Aug 07, 2012 07:16 AM|LINK
Hi,
I guess you have the trouble in accessing HiddenField in the parent Repeater control, when you need to use it to set the datasource for inner one ("i couldn't find hiddenfild value"). If so, you need to access the RepeaterItem of the parent Repeater first, then call FindControl() method to get the HiddenField. Try this:
RepeaterItem ri = (RepeaterItem)(sender.Parent);
HiddenField hf = (HiddenField)ri.FindControl("HiddenField1");
If I misunderstand, please describe the problem clearly with some source code.
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework