Print Page | Close Window

how to bind data dynamically in markup?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
Printed Date: 16 April 2024 at 4:00am
Software Version: Web Wiz Forums 12.04 -

Topic: how to bind data dynamically in markup?
Posted By: liwenhaosuper
Subject: how to bind data dynamically in markup?
Date Posted: 24 April 2011 at 7:37am
for instance, i want a button show text dynamically, how can?
cstring str="helloworld"    and  in the markup text, <Button>str</Button>  ,how let it show 'helloworld' instead of 'str'?

Posted By: mgampi
Date Posted: 25 April 2011 at 3:22pm

Use CString::Format()

In your case

CString Caption("Hello World");
CString MarkupText;
MarkupText.Format(_T("<Button>%s</Button>"), Caption);



Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 -
Copyright ©2001-2021 Web Wiz Ltd. -