473,811 Members | 2,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reset Function variable after Repeater control is finished

Hello,

I have 3 repeater controls referencing the same function below. What it is
doing is testing to see if the first column repeats itself and if so, add a
line with the managers name. The problem I have is how to reset
"strBlankRo w" after each repeater control is finished.

Thanks, sck10

<asp:Literal id="ltrNewLine " text='<%# BlankRow(Eval(" FinalApprovalHa ndle"))
%>' runat="server"> </asp:Literal>
Function BlankRow(ByVal strRepeaterValu e As String) As String
If strBlankRow <strRepeaterVal ue Then
strBlankRow = strRepeaterValu e
strReturn = "<tr><td class=BlueB height=25px width=95% colspan=9
valign=bottom>< br />" & _
strRepeaterValu e & "</td></tr>"
Return strReturn
Else
strBlankRow = strRepeaterValu e
Return Nothing
End If

End Function
Sep 2 '06 #1
2 1804
Hi sck10,

Repeater has an event named ItemDataBound, which is fired whenever an item
is bound to the data. You can reset the field "strBlankRo w" in this event.

This is what I think should work for your first statement "what it is doing
is testing to see if the first column repeats itself". However, according
to your second statement "how to reset after each repeater control is
finished", I think you need to reset the field in Repeater's another event
"DataBindin g".

Hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 4 '06 #2
Thanks Walter. Appreciate the reply...
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:wl******** *****@TK2MSFTNG XA01.phx.gbl...
Hi sck10,

Repeater has an event named ItemDataBound, which is fired whenever an item
is bound to the data. You can reset the field "strBlankRo w" in this event.

This is what I think should work for your first statement "what it is
doing
is testing to see if the first column repeats itself". However, according
to your second statement "how to reset after each repeater control is
finished", I think you need to reset the field in Repeater's another event
"DataBindin g".

Hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Sep 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1559
by: Chumley the Walrus | last post by:
I need to assign a variable to a record drawn from a db by way of a repeater control: <ASP:Repeater id="thedata" runat="server"> <itemtemplate> <%dim display display = Container.DataItem("displaygroup") %>
2
2373
by: ASP Yaboh | last post by:
I have a Repeater control bound to a DataSet that creates a table with 6 columns. The text displayed in one of the columns may need to be set to grey instead of black. The DataSet is held and manipulated in a separate class "ResponseData.cs". This class has a method ".getTextColor(int whichColumn)", which will return a HEX value for the text color. In JSP, a simple solution would have been to add inline code e.g. style="color: <%=...
1
2248
by: Bryan | last post by:
Hello, I am taking values from a datatable and formatting them for use in a JavaScript Function Call. The end result is a mouse over tool tip. Here is what I am doing. I have tried to use a property but it uses the last set value of all.
3
2867
by: WebMatrix | last post by:
I am struggling with implementing somewhat complicated UI web-control. I explored Repeater, but I am not sure if it's the best way to go. I am leaning towards writing my own custom control and creating elements on the fly dynamically. I have a control that needs to display 3 columns and n number of rows depending on number of records. Sounds simple. But each Row has a control with its own data source binding and value must be selected...
1
14388
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset button on my ASP.NET web page, and have an HTML reset button click clear 1) all validator text display and 2) validation summary display. Problem was clearing them and yet still leaving them working and visible if the user immediately began...
2
2034
by: Andy Fish | last post by:
Hi, First some background: When you databind a repeater control, the controls within the template are given an id like Repeater1:_ctl<n>:Button1 where <n> increments for each repeater item. If you re-bind the control later on in the page lifecycle, the contents are re-generated with the IDs starting from 0 again. I have written my own templated control which mostly works except that if you DataBind it more than once, the IDs don't...
7
5494
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the Repeater control, I've placed DropDownLists and CheckBoxes. When the user has updated the information, he/he clicks the submit button which is outside the scope of the Repeater control.
8
3032
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the way I'm going about doing this might be a little off. I'd appreciate some help. Below is the code I have thus far but I'm not sure how to reference the user control within the foreach loop. <asp:Panel ID="pnlRosterProfile" runat="Server" />
4
2235
by: mister-Ed | last post by:
I'm trying to check for "No Records Found" in a repeater list control, but my 'numrows' variable cannot be seen by the function CheckNoR , even tho it's public (?) <script runat="server"> 'Handle page load event public Sub Page_Load(Sender As Object, E As EventArgs) Dim MyConnection As SQLConnection Dim MyCommand As SQLDataAdapter
0
9730
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.