How To Find And Change The Text Of Labels At Runtime
I have few labels and barcodes in my .btw file and I will be changing their value at runtime using asp.net,c#.
Can anyone please help to find the labels in the file..
0
-
You need to specify a name for the data source in your BarTender document so that you may reference it to set/get from your external application. See the BarTender Help system for a full reference on how to integrate with BarTender using the .NET component.
Here is an example:
'This is how you would GET a value of a named data source. Engine btEngine = new Engine(); LabelFormatDocument btFormat = btEngine.Documents.Open(@"C:\MyLabel.btw"); string AddressSubstring = btFormat.SubStrings["Address"].Value; 'By contrast, this is how you would set values in a document's data source. Engine btEngine = new Engine(); LabelFormatDocument btFormat = btEngine.Documents.Open(@"c:\MyLabel.btw"); btFormat.SubStrings["Address"].Value = "1313 Mockingbird Lane, Anywhere, USA"; btFormat.SubStrings["Name"].Value = "John Doe"; btFormat.SubStrings["Quantity"].Value = "10";
0 -
works like a charm. Thanks.
0
Please sign in to leave a comment.
Comments
2 comments