473,748 Members | 4,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataBind() alternative?

Has anyone come across a way to bind simple properties (e.g. <%#
DateTime.Now.Ye ar %>, <%# UserName %in the underlying HTML) without
doing a general DataBind(); call?

Not only does it seem a massive waste of resources, I find this call
extremely annoying, particularly when working with Master pages where
inevitably I'll end up wiping out any manually build controls such as
added options to dropdowns.
It would be great if there was a Page.DataBind(f alse); that didn't
re-
bind children controls!
Thanks in advance!

Jun 22 '07 #1
1 1845
On Jun 22, 9:01 pm, Dunc <duncan.we...@g mail.comwrote:
Has anyone come across a way to bind simple properties (e.g. <%#
DateTime.Now.Ye ar %>, <%# UserName %in the underlying HTML) without
doing a general DataBind(); call?

Not only does it seem a massive waste of resources, I find this call
extremely annoying, particularly when working with Master pages where
inevitably I'll end up wiping out any manually build controls such as
added options to dropdowns.

It would be great if there was a Page.DataBind(f alse); that didn't
re-
bind children controls!

Thanks in advance!
Hi... if you what to use <%# .... %databinding constract in html..
i am afraid you must got to call databind method...
well if you are consern about pertial databinding just call the
controls databind method..

for instance you you have 5 grid. and you what to refresh just 4th...
dont call page.databind.. ..
call grid4.databind( )... some thing like that

Thanks
Masudur
http://munnacs.110mb.com

Jun 23 '07 #2

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

Similar topics

0
1421
by: autofill | last post by:
2 scenario inside a WebUserControl. I want to know why Microsoft and so many book doesn't suggest us to work like that. This control going to be in my page and I will call the DataBind of my user control. PAGE page_load(....) { if(!IsPostBack) { this.WebUserControl1.DataBind();
3
12017
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the DataTable, then I discovered the asp:Table has a DataBind method. But the method takes no args and so I'm confused how to use it. Is there a link to see how DataBind works for asp:Table? Should I just use my own code anyway? Thanks... Here's my...
1
1511
by: Martin | last post by:
Hi, I've got a web label control which I set a databind expression on the Text attribute in the html for the page (aspx file). At runtime, I want to override this attribute, so before I do MyLabel.databind() (or actually Page.DataBind()), I set Text to "". This doesn't work because then the databind comes along and redefines the Text attribute.
2
1771
by: Jim Bancroft | last post by:
Hi everyone, I have a DropDownList I populate as outlined below. This is from my code-behind file: private void Page_Load(object sender, System.EventArgs e) { BindMyData(); DataBind(); }
1
1523
by: Aayush Puri | last post by:
I was going through an article on datagrid control in ASP.NET and found the use of databind a bit confusing. So the default behavior in a editable datagrid row is to show a Update and a Cancel Button when a user wants to edit the datagrid. What I found confusing was the use of databinding when this cancel button is pressed. When we are pressing the Cancel button we are not changing the datasource...then why do we need to re-bind the web...
5
2198
by: Jurgen Appelo | last post by:
I'm at a loss here... My FormView control automatically performs a databind at each postback on the server. But in some cases I don't want this to happen. Like when the business layer decides that some of the information in the controls cannot be accepted. But then the FormView binds to the datasource again, and the input in all contols is lost. And the user will have to type it all over again. In ASP.NET 1.1 we could simply say: If Not...
4
1823
by: Arpan | last post by:
The following code works fine: <script runat="server"> Dim strName As String = "Arpan" Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Page.DataBind() End Sub </script> <form runat="server">
0
1060
by: nicklang | last post by:
Say you are creating a page which contains a child control which uses a DataList or DataGrid control. In a DataList, the rows are dynamic controls and are data bound, so you have to first load the data source and then DataBind. The problem arises when the containing Page calls DataBind before your child control, say in their Page_Load. So you have a Page with Page_Load calling DataBind and a child control with a Page_Load and a...
3
1503
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i was working on a formview and when i pressed my custom edit button to put the formview in edit mode, i then, recursively loop thru the page controls and see all the controls such as textboxes and other input controls. well, when i press my custom New button to put the formview in insert mode (using FormView1.ChangeMode(FormViewMode.Insert) i see on the screen the input controls as normal, but when i loop thru the page...
0
8991
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
8830
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
9544
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
9372
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...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
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
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.