I thought this would be easy but i cant find what i am looking for online
I have 2 pages, the first 1 has a button that opens another page. On this 2nd page the user selects a picture. When the user selects a picture the form closes. When they select a picture i want the image control on the first page to change.
I'm not sure how to do this, i guess i could set the image path as a session variable and reload the first page but again i'm faced with the problem of how to reference the first page from the 2nd
I have created a class within the App_Code called shared_methods.vb where I use methods that are frequently used within several pages.
I have a hyperlink control within the masterpage that i want to change the NavigateUrl depedning on what page. Just for better coding i would like to define the variable holding the hyperlink with my shared_method.vb.
Dim hl_back As HyperLink = CType(Master.FindControl("hl_master_back"), HyperLink)
This works within a page but not within shared_methods.
I want to use a dropdownlist control as paging options (50, 100, 150, 200) for a GridView control so I can reuse the user control on other pages that uses paging.The dropdownlist control will be in the user control page and the GridView will be on the host page. How do I reference the GridView control generically from the dropdownlist in the user control to set the PageSize property of the GridView control upon selecting one of the dropdownlist options. Any advice and if there are other means to accomplish such tasks to allow reusability.
I have a Data list, inside that i have a repeater, inside the repeater i have a panel.hat i want to do is reference my panel (Panel1) so that i can change the visible properties when a link button is clicked. However as this is inside a dynamic control i am a bit lost in how to reference it! This is my code
I would like to know how to reference the asp.net text field which is in the EditItemTemplate tag of a DetailsView control to load the JQuery DatePicker when clicked in the JQuery script. Following are the code that I have, but it throws the error :
The name 'txtDateOfBirth' does not exist in the current context
I am using a CustomValidator to compare two textbox control values in the form view. These values are not required but must be compared if a valuue is entered. The same two controls are defined in both Edit Item Template and Insert Item Template. The formview default mode is Edit.
The form view is in a content page. The script is in the Head content placeholder
I have a label control on my MasterPage that is used to display error information. If an error occurs on another aspx page or a Module.vb page, how can I display the exception in the label control on my MasterPage? I tried using a Session variable, however, it would not work in my Module.vb code-behind file.
My displaycloud.aspx page contains two databound data lists, each for displaying a tag cloud. The datalists have an EmptyDataTemplate that holds an empty label if nothing is retrieved from the db. I am trying to display the message 'Please Log a Story', by using the code below on the companyadmin page, but I am getting an error (the controls are not on the same page). How can I reference the labels positive_tags and negative_tags from displaycloud.aspx in companyadmin.aspx? Also, I want to redirect if the EmptyDataTemplate is not executed as shown at the very bottom of the page.displaycloud.aspx:
I have the following code which at the moment sits in a number of pages:
It sits in the page because I reference the usercontrol type 'emailSignUp' and pass data to an exposed variable 'DisplayType'. The control is located in the pages master page. Ideally what i'd like to do is put this in its own class or something, so I can just call it passing the configuration variable, but I'm unsure how this would work -
I have an imagebutton control in the column HeaderTemplate of a gridview and want to know how to reference the imagebutton so I can add an attribute to it programmatically. Following is the code for my gridview control:
I can reference the checkbox control correctly with CheckBox chkbox = GridView1.FindControl("chkSelected") as CheckBox;However, I have tried the following code for the imagebutton but I get the error message Object reference not set to an instance of an object.:
Or is the OnInit event handler the right place to reference the control?
I have a db connection string 'ApplicationServices' defined in the connectionString section of web.config and 3 Entity Framework connection strings which have the provider connection string attribute with the same connection string as the one in 'ApplicationServices'. Is there a way to reference connectionString in 'ApplicationServices' for the provider connection string attribute of the EF connection string in the web.config, rather than providing the connection string all over again?
I am trying to create a control, but I need to load my formatting string from my web.config file, but every time I try to run the program I get an error one the formatting line. show me the correct syntax to load this data?