Dropdown selected index and text box text not getting reflected on web page

 Hi All,

I have to bind the pre inserted data to the web page.

Page has drop down lists and text boxes.

I am using the following methods to bind these controls:

 1. Drop down list:

                           int index = dropDownList.Items.IndexOf(dropDownList.Items.FindByValue(value));
                                 dropDownList.SelectedIndex = index;
 2. Text box:

                       textbox.text = datavalue.text;

The problem here is, when I see in Quick watch, the selected index and text property of the controls are getting modified but the

same is not getting reflected on the page. The selected index is still '0' and the textbox value is 'empty' string.

I am using .net 2005.

Am I missing some thing here?

Please advise.

Thanks a lot in advance.
 

 

0
SwarnaNP
12/20/2007 12:16:13 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

3 Replies
945 Views

Similar Articles

[PageSpeed] 6

Are Both controls in update panel? Do you have Update Panel on the page?


Click on 'Mark as Answer' if this post is helpful.

ImranKhan pathan
0
impathan
12/20/2007 1:13:37 PM

Hi SwarnaNP,

UpdatePanel controls are a central part of AJAX functionality in ASP.NET. They are used with the
ScriptManager control to enable partial-page rendering. Partial-page rendering reduces the need for
synchronous postbacks and complete page updates when only part of the page has to be updated.
Partial-page rendering improves the user experience because it reduces the screen flicker that occurs
during a full-page postback and improves Web page interactivity.

For instance, if the Dropdownlist and the Textbox are outside an Updatepanel, and then you click a button
inside the UpdatePanel to cause post back, only the controls inside the UpdatePanel will be re-rendered.

For more information about the UpdatePanel control, please refer to the following Microsoft web site.
http://msdn2.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx

And if there are no UpdatePanel controls in your web form page, I think you should post your detailed code
here for troubleshooting.

Regards,
Xun


Regards,
Xun Ye.
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that
helps you, and to click “Unmark as Answer” if a marked post
does not actually answer your question. This can be beneficial
to other community members reading the thread.
0
Xun
12/24/2007 4:13:48 AM

Hi, Thanks a lot for the help.

-Swarna 

0
SwarnaNP
12/24/2007 6:10:01 AM
Reply:

Similar Artilces:

Load Text box of one web form with selected list item of list box of another web form
one help please Problem is i have two web forms  1.  ForiegnkeyTest.aspx  2. foroginkeytable.aspx   step 1 1 ForiegnkeyTest.aspx one web form <head runat="server"><script language="javascript" type="text/javascript">   function popWin()   {         var confirmWin = null;      confirmWin = window.open('foroginkeytable.aspx','anycontent',   'width=455,height=435,status');   }  </script> &...

VB .net Web Form will not get contents of Text Box
I have created a web form with text boxes that are bound to a DataSet/DataView.  I have created button to navigate up and down the recordset.  That all works fine. I need to have the ability to edit/add text in any of the boxes and then when clicking "Save" button, it would build an UPDATE query to send to the database. When the Save button is clicked, I have coded to DIM a string var (strSQL) to use to build the SQL command.  For some reason, it will only get the text from a text box if the data was pulled the database.  If I add/edit data, then the SQL command will ha...

Unable to select text on web page or in editable text area
I have been writing web pages in ASP.Net 2.0 and I am unabe to select any text on the page. I have also found that I cannot select any text in a text box, which is really annoying, particularly when I need to copy and paste. How do I solve this issue? Is there a setting to allow users to be able to select text? Thanks ...

Getting selected text in a web page onto a XUL context menu (with right click, aka Google Selection )
Hello, I am working on writing an extension that will, add the selected text to the Firefox context menu. Something like the "Google for XYZ" which you see if you select "XYZ" text on the screen and right click on it. I have tried unsuccessfully with this.getSelection() & this.getAttribute("id") for some time but it did not work out. event.getSelectedText() also does not seem to working. Can someone help/ guide me through the process so that I can create my own Firefox extension? Thanks in advance -- Manish Chakravarty my code (for overlay.js ) ...

Problem in selecting text in List box Web Form
hi In List box load the data from database. If i am select any Item from list box i am geting selected Indexvalue ="-1" at the same time i am not get the text value. how can i get the selected index text value. Regards, Sabarish. Hi, it sounds to me that you're rebinding your data upon every postback. If you're doing it in code behind place it between if(!Page.IsPostBack) to avoid this. Then you should be able to get a value different than -1 (which means nothing's selected). Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for...

Getting error while disabling the text boxes on Web Form
Hello Folks...THis is very urgent ...Plz help...Following is a piece of code....to disable all the textBoxes on a WebForm in ASP.Net.(Lang:VB.Net) Private Sub disableAllTextBoxes(ByVal ControlArray) Dim control As Object Dim temptxtbox Dim i As Integer For Each control In ControlArray       If control.GetType.Name = "TextBox" Then          control.GetType.GetTypeArray(control).CopyTo(temptxtbox, 0)          For i = 0 To UBound(temptxtbox)     &n...

Check if the text box "text" has changed (RePost from web forms forum)
Greetings! How can i know if the "text" inside of a text box has changed? For example, I currently have this: if (txtMU.TextChanged()) { } But this does not work. The other idea I had was to assign the existing value of the text box to a string and then when the user click the save button I can create a conditional statement to compare the original string with the new string. However, I would like something more effective as I have like 12 text boxes to compare. Thanks, EduardoThanks,Please Mark this post as answered if it was helpful. Here is the easiest way that I have ...

Getting selected text in a web page onto a XUL context menu
Hello, I am working on writing an extension that will, add the selected text to the Firefox context menu. Something like the "Google for XYZ" which you see if you select "XYZ" text on the screen and right click on it. I have tried unsuccessfully with this.getSelection() & this.getAttribute("id") for some time but it did not work out. event.getSelectedText() also does not seem to working. Can someone help/ guide me through the process so that I can create my own Firefox extension? Thanks in advance -- Manish Chakravarty my code (for over...

access text boxes of aspx page in cascading dropdown web service.
i have a aspx page where i have two text boxes fromdate and todate. i have written the cascading dropdown lists using a web service.  I want to know how we can access textboxes of aspx page in web service.My actual requirement is that i need to pass the text box values of aspx page   to function(web method)  written in web service.  i need to fill the first drop down in cascading drop down based on fromdate and todate criteria.  You need to use JavaScript in the client, asumming you are using ASP.NET Ajax: MyWebService.MyFunction($get("TextBox1").value, ...

Bold Text For Selected text in Text Box
Hi EveryoneI have a small thing to do [at this time , very big for me]. I want to make some text string as bold which appears in a text box control for the web. It means some of the portion of the string will be bold and some will be in the normal font style. Can anyone suggest any idea to accomplish this task. [I know that we can set the font weight property for the whole text box and all the text appears in the selected font-weight]Any suggestions.BaberBaber SaeedSoftware EngineerPalmChip, Pakistan Toll Free: 0800-000-13 Ext:494Cell: 0300-6438634 Standard TextBox that comes with ASP.NET ...

Copy web text fr FF2 PASTE to outlook text mail msg get an attachment not text
I never had this problem with IE. When I copy text from a web page and try to paste it as text into an Outlook2000 TEXT mail message, it instead is rendered into an attachment to the message. I just want to paste the text. Does anyone know why this happens, better yet - how to fix it? Currently I have to past the text into a text editor, and then recopy that into my Outlook mail message. This is getting old fast. Thanks in advance. Sandalls On 2/23/2007 5:01 PM On a whim, Sandalls pounded out on the keyboard > I never had this problem with IE. > > When I co...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

Fill in web page search box and get resulting web page via code?
Hi all, I have a web page: http://www.national.com/mpf/CO/COP8ACC5.html and I am wondering how I could simulate entering a value in the search text box, pressing search and then getting the resulting web page so I can process the information? I can process the info already if I manually get the source of the resulting web page, but not how to get the page automatically via programming. I have access to Delphi 5 and Delphi 2007 Win32 if this helps... Thanks in advance, Cheers, Paul. "The plastic veneer of civilization is easily melted in the heat of the mome...

How do I stop web clients copying text from a web page?
Hi,I'm new to developing web sites with asp.net and C# but making good progress.  I have a basic site setup which is access data from an SQL Server and displaying some of the information in Labels. Everything works fine but my employer has a concern about users of the website being able to copy the information. Fair enough that anyone can manually copy information with a paper and pen etc but how do people go about stopping automated programs that screen scrape etc. Or stopping basic Cut n Paste operations. Any suggestions or pointers in the right direction would be much a...

Web resources about - Dropdown selected index and text box text not getting reflected on web page - asp.net.web-forms

Basking in reflected glory - Wikipedia, the free encyclopedia
The affiliation of another’s success is enough to stimulate self glory. The person engaging in BIRGing does not need to have been personally ...

Portland reflected - Flickr - Photo Sharing!
Portland, OR From the blog at: www.nomadicpursuits.com/

A life brilliantly reflected
Clive James talks life, love and death.

London melts under building's reflected glare (01:23)
Reflected sunlight from a new London skyscraper, nicknamed the walkie talkie, has been melting cars, blistering paint and frying eggs on the ...

Jonah Lomu remembered: 'His life reflected the might of God'
All Blacks&nbsp;great Jonah Lomu has been remembered as an inspirational dreamer whose heart never left the Tongan community at a ceremony in ...

A life brilliantly reflected
Clive James talks life, love and death.

Life reflected in BHP’s figures
BHP Billiton&#8217;s production figures effectively fired the starter&#8217;s gun for the annual profit season. They also neatly captured in ...

Auld Lang Syne: ex-coach won't bask in reflected glory
Auld Lang Syne: ex-coach won't bask in reflected glory

London melts under building's reflected glare (01:23)
Reflected sunlight from a new London skyscraper, nicknamed the walkie talkie, has been melting cars, blistering paint and frying eggs on the ...

Reflected glory: Imitation, biography and moral formation in early Christianity
It was Christianity's investment in the idea of incarnation - the belief that God has entered the world in human flesh - that made exemplary ...

Resources last updated: 11/24/2015 12:43:34 AM