Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Data Binding and Formatting Problem
Hello developers,

I bind my TextBox control specyfying a format stored in my application
global ApplicationContext object - it has a static string CurrencyFormat
property.

The problem - this works fine:

Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'

but this does not:

Text='<%# Bind("Price", ApplicationContext.CurrencyFormat) %>'
(Parser Error Message: A call to Bind was not well formatted)

Could anyone suggest a solution?
The objective: store format strings globally.

Thank you for any hints.

Thomas Jastrzebski



Report this thread to moderator Post Follow-up to this message
Old Post
Tomasz J
04-17-08 12:39 AM


RE: Data Binding and Formatting Problem
Hi Tomasz,

Regarding on the Databinding expression issue you mentioned, I've performed
some tests and did encounter the behavior you mentioned.  I've checked the
document, though the formatting of "Bind" is not definitely documented, it
mentioned that Bind doesn't provide the exact same set of databound
functionality like Eval.  For example, Eval support complex hierarchy class
object databound while Bind not.   The NumberFomatInfo should also be
limited by the Bind expression.  I'll help you forward the problem to some
other ASP.NET engineers to see whether they have any further ideas on this.
You can also submit the problem to our connect site:

http://connect.microsoft.com/feedba...aspx?SiteID=210

So far, as a workaround, you may need to use Eval instead of Bind for the
display formatting. And manually set the parameter for editing/updating.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

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

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

--------------------
>From: "Tomasz J" <oegweb@nospam.nospam>
>Subject: Data Binding and Formatting Problem
>Date: Thu, 17 Apr 2008 00:23:31 +0200

>
>Hello developers,
>
>I bind my TextBox control specyfying a format stored in my application
>global ApplicationContext object - it has a static string CurrencyFormat
>property.
>
>The problem - this works fine:
>
>Text='<%# Eval("Price", ApplicationContext.CurrencyFormat) %>'
>
>but this does not:
>
>Text='<%# Bind("Price", ApplicationContext.CurrencyFormat) %>'
>(Parser Error Message: A call to Bind was not well formatted)
>
>Could anyone suggest a solution?
>The objective: store format strings globally.
>
>Thank you for any hints.
>
>Thomas Jastrzebski
>
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Steven Cheng [MSFT]
04-17-08 10:40 AM


Re: Data Binding and Formatting Problem
Hello Steve,

Thank you for a swift response.
I cannot use Eval - I presented this code for a problem demonstration only.
Eval provides one-way binding only, while I also need to unbind my data in
order to store user changes.

Kind regards,

Thomas Jastrzebski

"Steven Cheng [MSFT]" <stcheng@online.microsoft.com> wrote in message
news:YPQ9jLFoIHA.10116@TK2MSFTNGHUB02.phx.gbl...
> Hi Tomasz,
>
> Regarding on the Databinding expression issue you mentioned, I've
> performed
> some tests and did encounter the behavior you mentioned.  I've checked the
> document, though the formatting of "Bind" is not definitely documented, it
> mentioned that Bind doesn't provide the exact same set of databound
> functionality like Eval.  For example, Eval support complex hierarchy
> class
> object databound while Bind not.   The NumberFomatInfo should also be
> limited by the Bind expression.  I'll help you forward the problem to some
> other ASP.NET engineers to see whether they have any further ideas on
> this.
> You can also submit the problem to our connect site:
>
> http://connect.microsoft.com/feedba...aspx?SiteID=210
>
> So far, as a workaround, you may need to use Eval instead of Bind for the
> display formatting. And manually set the parameter for editing/updating.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
>  ========================================
==========
> Get notification to my posts through email? Please refer to
> [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/ur
l]
> ications.
>
>  ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> -------------------- 
> 
>



Report this thread to moderator Post Follow-up to this message
Old Post
Tomasz J
04-17-08 10:40 AM


Re: Data Binding and Formatting Problem
This issue has been described as item 338632
https://connect.microsoft.com/Visua...=3
38632

Thanks,

Thomas Jastrzebski

"Steven Cheng [MSFT]" <stcheng@online.microsoft.com> wrote in message
news:YPQ9jLFoIHA.10116@TK2MSFTNGHUB02.phx.gbl...
> Hi Tomasz,
>
> Regarding on the Databinding expression issue you mentioned, I've
> performed
> some tests and did encounter the behavior you mentioned.  I've checked the
> document, though the formatting of "Bind" is not definitely documented, it
> mentioned that Bind doesn't provide the exact same set of databound
> functionality like Eval.  For example, Eval support complex hierarchy
> class
> object databound while Bind not.   The NumberFomatInfo should also be
> limited by the Bind expression.  I'll help you forward the problem to some
> other ASP.NET engineers to see whether they have any further ideas on
> this.
> You can also submit the problem to our connect site:
>
> http://connect.microsoft.com/feedba...aspx?SiteID=210
>
> So far, as a workaround, you may need to use Eval instead of Bind for the
> display formatting. And manually set the parameter for editing/updating.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
>  ========================================
==========
> Get notification to my posts through email? Please refer to
> [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/ur
l]
> ications.
>
>  ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> -------------------- 
> 
>



Report this thread to moderator Post Follow-up to this message
Old Post
Tomasz J
04-17-08 10:40 AM


Re: Data Binding and Formatting Problem
Hi Tomasz,

Thanks for infoming me this. I've  forward this issue to some other ASP.NET
engineers (also include the connect report link). I'll update you if I get
any new information.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

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

 ========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "Tomasz J" <oegweb@nospam.nospam>
>References: <##5l6BBoIHA.2068@TK2MSFTNGP05.phx.gbl>
<YPQ9jLFoIHA.10116@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Data Binding and Formatting Problem
>Date: Thu, 17 Apr 2008 11:39:04 +0200

>This issue has been described as item 338632
>https://connect.microsoft.com/Visua...back.aspx?Feedb
ackID=338632
>
>Thanks,
>
>Thomas Jastrzebski
>
>"Steven Cheng [MSFT]" <stcheng@online.microsoft.com> wrote in message
>news:YPQ9jLFoIHA.10116@TK2MSFTNGHUB02.phx.gbl... 
the 
it 
some 
Please 
http://msdn.microsoft.com/subscript...ault.aspx#notif
 
>
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Steven Cheng [MSFT]
04-18-08 10:05 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP .NET archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:42 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.