CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Changing the value of a Link control

Print topic Send  topic

Author Message
jono

Posts: 1
Posted: 01/29/2010, 3:09 PM

For the life of me, I cannot figure out why this does not work.

I have a grid. the column captions I changed to Link controls. (named HeaderLink_COL1 for instance). It currently has static text (the word "header"). I want to change the test of the link to something else (let's say..."Proposal 1"). In the before show event of the grid, I have the following code:

BALLOT_MATRIX.HeaderLink_COL1.Page = "proposal_edit.asp"
BALLOT_MATRIX.HeaderLink_COL1.Parameters = CCAddParam(BALLOT_MATRIX.HeaderLink_COL1.Parameters, "PROPOSAL_ID", "1")
BALLOT_MATRIX.HeaderLink_COL1.Value = "Proposal 1"

The text of the link does not change...howver the page and parameters do.

I have tried putting this same code in the BeforeShow event of the control as well...and still have the same result.

What am I doing wrong here??

View profile  Send private message
andrewi

Posts: 162
Posted: 01/31/2010, 4:29 PM

The help file isn't clear about this (Welcome to Codecharge!), but Static text will do as the option says: it will never change. (if you look at the HTML, you'll see it's literal text between the <a> tags, not a {placeholder} )

When you insert the link control choose "Text from the Database" instead of "Static Text". Leave the drop-down list blank.

Then in the link's BeforeShow event you can put the BALLOT_MATRIX.HeaderLink_COL1.Value ="Proposal 1" and it should work. (in the HTML you'll note that there is a placeholder - like {LinkName} - for the link text between the <a> tags.)

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.