Pass 1 control value to another control value - detailsview

I have this form, is the detailsview, and in edit mode, I have a link
that you click to open up a small dhtml window (not a new window but
more like a layer so everything is on the same page).  When I
select an item from the dhtml window, it puts the value into a
textbox.  I then have a button I click and I want to pass that
value from that textbox to the textbox in the detailsview.  When I
click the button, the value is not passed.

Here is the code I use for getting the value from the dhtml window and assigning it to the detailsview textbox:

If e.CommandName = "pickedColor1" Then
CType(dvThemeColors.FindControl("TextBox1"), TextBox).Text = CType(dvThemeColors.FindControl("pickedColorCode1"), TextBox).Text
End If

but this does not work.  TextBox1 is the ID of the detailsview text box and pickedColorCode1 is the ID of the text box in the dhtml window.  Both have runat="server"

What am I not doing correctly in assigning the value from pickedColorCode1 to TextBox1?

thanks Smile [:)]

0
bobothebugbear
3/10/2006 9:06:48 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
1157 Views

Similar Articles

[PageSpeed] 20

Have a general idea of what is happening.

pickedColorCode1 text box is filled by javascript and when I run code behind, this value is lost but I wouldn't think it would be lost since it is runat.

Any thoughts?

0
bobothebugbear
3/10/2006 10:35:56 PM
Reply:

Similar Artilces:

Passing values from a parent web control to child web control
I have a parent control which called CONTROL1 and a child control witch called CONTROL2 I would link to pass a value from the parent control to the child control. In the parent control(CONTROL1) I have the following Event Handler . private void btn_Handler(object sender, EventArgs e) { …      if (Page.IsPostBack) {              // Send the officer names to the child controls.             if(m_nameList.SelectedItem.Text != "")     ...

when loading a previously created record on to form, some controls are missing values(controls are depended on values selected in other controls)
Hello - I have created a page for Editing records.  this page will open up a chosen record and allow user to edit the data.On the form, I have 3 drop down lists.   The second dropdown list should fill values depending on value chosen in first dropdown list.  The third dropdown list should show/fill values depending on value chosen in second dropdown list.So taking this into count, i have several records with various data.  When I open-up/load a record in Edit form, only the first dropdown list has a value selected that was the pre-existing va...

Cannot pass target control value to web method (autocomplete, .NET 2.0, toolkit release 1.0.20229)
I am trying to use 1.020229 in VS 2008, and maybe that is my problem, but I want to use VS 2008 and target a .NET 2.0 framework and I have tried several of the other toolkit controls in this same environment (e.g. tabpanel) and they seem to work. The problem is that when I use "public string[] GetSuggestions(string prefix, int n)" in the web service code behind, it never gets invoked.  But if I remove the parameters (i.e. "public string[] GetSuggestions()", then it does, but of course in that case the results have nothing to do with the text entered in the target ...

Passing Values from a Web Form to Another Web Form
Hello All! I am trying to pass values from one web form to another web form. I know that there are 3 ways of doing this: queryString, Server.Transfer and Session. I am using the Server.Transfer method. But I am not able to create, in my 2nd web form, an instance of my 1st web form. My 1st Web form is named CallTrack.aspx and my 2nd is named Export.aspx. What I mean is something like this: Public value as CallTrack. I can't create it in my 2nd web form because when the intellisense is displayed, there's no CallTrack in the options. Thanks!   How about using cross-...

Trying to pass values from one control to another control
I have 2 controls on my page. CaseList and Email Reviwer. CaseList contain a datagrid that when the button (5th column) is clicked 2 values should be passed to the email revier control. In the email Reviwer Control I have declared: I have: public void sendCaseIdCatId(int catid,int caseid) { ViewState["EmailReviewerCategoryId"] = catid; ViewState["EmailReviewerCaseid"] = caseid; } in my EmailReviwer control   I tried: //Display the email reviewer panel EmailCaseReviewer.Visible=true; string strcatid = e.Item.Cells[1].Text.ToString(); string strcaseid = e.Item.Cells[0].Text.T...

Control.Value and Control.SelectedItem.Value
Can someone explain to me the difference between say, Dropdownlist.SelectedItem.Value and Dropdownlist.SelectedValue?? Just curious, Thanks!Tim These are going to return the same thing. dropdownlist.selectedvalue is a shortcut to get the currently selected value in the dropdown. If that is all you want then you can just use that. If you want to access the currently selected item you can use dropdownlist.selecteditem and that return the item and you can then access any of the item's properties, including in this case the value property. If this post answered your question please r...

How to pass control values from one ascx user-control to another???
Our site is set up using a primary default aspx page that is used as the "base page" for everything. On this page, we dynmaically place various user controls at run-time. This gives us a functionality similar to using frames where the outer-frame actually just sits there while various webfiles are loaded inside of it. Works great except for one thing... trying to figure out the best way to pass control names/values accross user controls. When the same usercontrol is posting back to itself this is a non issue. So far most of our functionality has worked well using the local...

Pass value from one User Control to another User Control
I have tried to pass value from one user control to another user control. Because of Page Auto Postback, Contrls are load before page is loaded. So I get the value in 2nd UC after one more post back operation. I have visited many suggessions but I cant solve this. Is anyone can help me to solve this. Thank U mfhossain@gmail.com Muhmmad Fakhrul HossainEmail: mfhossain@gmail.comPhone: +88 01715 111512Web: http://www.mfhossain.info You'd have to do that through the parent probably in it's Page_Load event handler.   userControl1.publicProperty = userControl2.publicProperty;  ...

Passing value from one control to another and inserting that value in a table
Hey all, sorry if the subject is confusing or has already been covered, but I have (obviously) a problem (at least one).This is using:Visual Studio 2005ASP.NET 2.0SQL Server 2005 ExpressVisual Basic I'm building a CRM system for my company and have run into a snag when attempting to add new customer records for a given client. The first thing that any CSR (or admin) must do upon accessing the CRM system is choose which client's customers they are actually working with (we have multiple clients and are ultimately responsible for providing customer service to the clients' end ...

Passing values to a Windows Control in a Web Form
I have created my grid in windows and am hosting it in an asp.net page. My question is can I pass session variable to the winform from my asp.net form and vice versa? Any help is greatly appreciated I don't believe you are able to do this as a session variable.  Now I might not be accurate in my terminology here but I think it because of how session states are handled.  They are in two seperate system processes (or pools). So for instance, when a user launches your asp.net form, it uses the aspnet_wp.exe.When a user launches your web form, it uses your project.exe Both of thes...

Problem in Passing controls values between web forms
Hi friends          i have problem with my .aspx application inwhich i want to store the values of controls in a webform to the variables in the other one.         My application is like, i have a mainpage in which i have an <IFRAME>, into which i call other 3 .aspx pages one by one using links. Now i wants to save the values of controls in those all three child page in my mainpage variables and from that i want to store them in database.        Please help me ou...

Passing values from one web control to another.
I'm trying to pass a value from one user control to another. Basically, the first user control selects an id number and then the second user control takes that id number and updates a record in a database. I have the second control set up to accept values using public string idnumber; public string IDnumber { set { idnumber = value; } } The second user control has two buttons that do postbacks, depending on which is clicked, a value is updated in the database identified by this number. The problem I am having is that before I click th...

Pass Values from a user control to a web form
Hi All,  I am currently trying to add captcha to my webform. I have a question on how to pass a number/string from a .ascx to a .aspx page. The aspx is being used in the .ascx (user control) in an image tag. <asp:Image ID="imgCaptcha" runat="server" ImageUrl="Image.aspx"/> The aspx page is being rendered as a jpeg image. So Inorder for the captcha to be displayed with the image, I need to pass the code from the user control to the aspx page. I have an option to pass the number as a query string or use it in session. But is there any ot...

How to pass values from window form control to Web page !!!
Hi i have a window form control which is downloaded on the client's machine.and it writes a binary image file on the client's machineAnd now i have to get this binary image file from client's machine and save it to database.Plz tell me Is this possible using window form control???OR there is any another way so that i can access the binary image file from client's machine.Thanks in advance.  Good luck on that one! This sample might help. It passes a string value from a windows component to the web page. //////////////////////////////////////////////////////////////////...

problem passing value from pop up control to web form
i have two files    a)ForiegnkeyTest.aspx opner   b)foroginkeytable.aspx popup i want value txtaeropuerto.Text should be transfered to the in the webform ForiegnkeyTest.aspx after passing value to web form the pop must close automatically            what i need is                    1) after passing values from pop up control to web form it must close automatically , and value must be displayed in web form     &...

Web resources about - Pass 1 control value to another control value - detailsview - asp.net.web-forms

Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta
In this article, Scott discusses the recently released beta version of Visual Studio 2008 and .NET Framework 3.5 Service Pack 1. He starts with ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

DotNetKicks.com - Upcoming stories
DotNetKicks.com is a community based news site edited by our members. It specialises in .NET development techniques, technologies and tools including ...

<asp:DetailsView ID="grd_empDetails" runat="server" DataSourceID="empDataSource - Pastebin.com
Pastebin launched a little side project called HostCabi.net , check it out ;-) Don't like ads?

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Resources last updated: 12/26/2015 5:17:00 PM