Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionThe datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian1439-Nov-16 13:19
indian1439-Nov-16 13:19 
AnswerRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 2:13
mveRichard Deeming10-Nov-16 2:13 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 5:53
indian14310-Nov-16 5:53 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 5:58
mveRichard Deeming10-Nov-16 5:58 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 6:30
indian14310-Nov-16 6:30 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 6:48
mveRichard Deeming10-Nov-16 6:48 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 6:51
indian14310-Nov-16 6:51 
Questiondiv controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 5:17
Scott529-Nov-16 5:17 
Hello,

I am modifying an existing website. There is a nice feature where on one of the pages, if multiple images are returned by a datasource associated with a repeater control, the images can be swapped out by the user by clicking on either a left or right arrow which appears on the image. I wish to make the left and right arrows invisible if the repeater only has one image, as there is no ability to swap images when there is just a single image. Unfortunately, I can't figure out how to work this.

A simplified example of the ASP.NET code resembles this:

[ div outsidecontrols]
[ div class="arrow-left">< / div ]
[ div class="arrow-right">< / div ]
[ /div]
[asp:Repeater ID="Images" runat="server">
[div class="slide-image">
[img src="<%#Container.DataItem("Image_Name")%"/>

(In the interest of conveying where the div tags are for the left and right arrows, I have had to change some of the tags to use square brackets, as apparently if it looks like real code this forum tries to really put div tags in the comments.)

There is more to the code, but this is essentially what I am looking at. If I could get a record count of the repeater control, then I could conceivably hide the arrow controls if there was only one image. Something like this:

<asp:repeater id="Images" runat="server">
If #Container.DataItem.System.Data.DataRowView.Table.Rows.Count = 1 then
div.arrow-right.visible = false
div.arrow-left.visible = false
end if

Unfortunately, so far I can't get the record count of the data source feeding the repeater control with images. I also can't figure out how to make the left and right arrow div controls invisible after the repeater statement is encountered.

Does anyone have any suggestions about how to conditionally hide outer div controls based on the record count for a data source that is used by a repeater control to populate images? Does anyone know how to find the record count for a data source used by a repeater control?

Thanks,
AnswerRe: div controls outside of a repeater should be made invisible Pin
Richard Deeming9-Nov-16 5:42
mveRichard Deeming9-Nov-16 5:42 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 7:59
Scott529-Nov-16 7:59 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 9:57
Scott529-Nov-16 9:57 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Richard Deeming9-Nov-16 10:38
mveRichard Deeming9-Nov-16 10:38 
QuestionMessage Closed Pin
9-Nov-16 2:00
Pk Fun Zone9-Nov-16 2:00 
AnswerRe: Design my Site?? Pin
Richard MacCutchan9-Nov-16 2:24
mveRichard MacCutchan9-Nov-16 2:24 
AnswerRe: Design my Site?? Pin
Peter Leow9-Nov-16 2:35
professionalPeter Leow9-Nov-16 2:35 
QuestionNeed help with showing tab info when first landing on page. Pin
Bootzilla336-Nov-16 11:28
Bootzilla336-Nov-16 11:28 
QuestionHow do layout out the columns using stringbuilder? Pin
samflex4-Nov-16 15:51
samflex4-Nov-16 15:51 
AnswerRe: How do layout out the columns using stringbuilder? Pin
Richard MacCutchan4-Nov-16 22:52
mveRichard MacCutchan4-Nov-16 22:52 
GeneralRe: How do layout out the columns using stringbuilder? Pin
samflex5-Nov-16 2:33
samflex5-Nov-16 2:33 
QuestionGenerate SQL query Pin
Member 128253814-Nov-16 6:23
Member 128253814-Nov-16 6:23 
AnswerRe: Generate SQL query Pin
Richard MacCutchan4-Nov-16 6:58
mveRichard MacCutchan4-Nov-16 6:58 
QuestionOperation must use an updateable query - question Pin
Member 87616672-Nov-16 15:59
Member 87616672-Nov-16 15:59 
AnswerRe: Operation must use an updateable query - question Pin
Richard Deeming3-Nov-16 3:10
mveRichard Deeming3-Nov-16 3:10 
QuestionCrud operation by pattern Pin
Member 1282618731-Oct-16 20:27
Member 1282618731-Oct-16 20:27 
AnswerRe: Crud operation by pattern Pin
Nathan Minier1-Nov-16 2:12
professionalNathan Minier1-Nov-16 2:12 

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.