How can I hide a control on a "Web Content Form" depending on what page is displaced.Working example. I have a control on a master page but I want this control to be hidden only when a particular page is loaded.
New users can register on my site by completing a basic form that has the create user wizard control with some additional information i am collecting using a CheckBox List. They can then log in to the site and and view "MypProfilePage.aspx" where I display the information with the CheckBoxList boxes already ticked based their selections which they can update. My problem is I have two levels of User and each one has a different registration form.
Registration Form A Has 20 Items in the CheckBox List
Registration Form B Has 10 items in the CheckBox List
On the Profile Page, I just want to show the CheckBox which is relevant to the Registration form A or B and with selections by the registered user. So therefore the User who registered on B will not be able to see the selections checkbox list for A.
I am designing a website. I have created a simple menu(without sitemap) in master page and a web page called home.The problem is that when I hosted this website submenu's of the menu control are hide behind the images of home webpage and if the any webpage has no image all Submenus are appears. Have any problem in my menu creation. I have copy my code in this window but due to some reason it not shown.
I've ready everything I can find on the built-in validators but can't figure out how to do the sort of validation I need on theclient-side (I can do it on the server-side). Business rule I want to enforce (review the gridview snippet below) is if user checks the CheckBox_EditLifeCycleRpt control but doesn't enter a value in the TextBox_LifeExpectancy control then the validation should fail.
I have a .net 3.5 web form with an ajax combo box and a text box inside it. The bombo box is bound to a SqlDataSource.
My requirement is to show/hide the text box depending on the text of the selected item in the combo box. If a particular string, say 'xyz', appears in the text of the selected item, the I will make the text box invisible. I enabled the AutoPostback, made the text box disappear in the SelectedIndexChanged event, and everything worked fine.
However, when users enter their own texts (which are not in the list items), I am unable to show / hide the text box. I've tried the TextChanged event but nothing happens. It seems the event is not trigger after I enter a new text and locate the focus to other place.
is there a way to prevent the user ented text from being inserted into the bombo box?
the template of my website looks quite good when printed, so i have no separate print css.
However, there is one element at the top which is not needed when printed, and about 2 inches high, so that's kind of a waste at the top of the printed page (which imho distracts the user from the actual content)
So, what i want to accomplish, is 'hide' that element (div) at the top of the page when a user prints the page.
But so far the only solution i've seen is top create a separate css document which then will be used when the user will print my page. That sounds good, but do i now have to maintain 2 different stylesheets with exact the same content (besides that one div)?
Or is it possible to sort of override the standard stylesheet in the print stylesheet? (so i only have to define the exception for that one div in my print stylesheet?)
I have a Menu control in MasterPage based on web.sitemap file. My website has roles enabled (AspNetWindowsTokenRoleProvider) and uses Windows authentication mode. So, user has to be in a specific Windows Group to be able to access the site. I need to allow some users to see all menu nodes and some restricted set of nodes. How do I do that?
I would like to be able to create, say following Windows groups:
I have an aspx page that references a server control from an assembly and lives in Sharepoint (knowledge/experience in Sharepoint is not required to answer this question, i'm simply giving you context). The implementation looks something like this:
I can NOT change the .aspx page's content which currently lives in Sharepoint and I have to to take the same code and run it outside of Sharepoint but still on an ASP.NET environment. It's cool and crazy at the sametime, I know.
When this aspx page is running in Sharepoint, I have to get the WYSIWYG editor control to use Sharepoint's WYSIWYG control. When the same aspx page is running outside of Sharepoint but still in an ASP.NET environment, I need it to use a different server control that's not dependent/from Sharepoint. How could I modify the code-behind to perform this toggling? Is this even possible?
I have a with dynamic values from an Enum like: String, Int, Double, Bool, DateTime.How do I create a new Control depending on what is the SelectedValue dynamically into the page? I want a CheckBox for Bool, TextBox for String, Calendar for DateTime etc.
How can i make a control required to put input depending on the radiobuttonlist selection? Let me try to clarify a bit more. I got 2 radiobuttons, if one gets selected, nothing else has to be done. But if the otherone gets selected, a textfield must have some input too.
I would like to simply have an image button on my page that would show an image that says something like "Upload File".When the user clicks the button I would like for it to automate popping up the "select file dialog" exactly like the "browse" button does on the FileUpload control now. Then if the user selects a file and click "OK" I want to do a post back where I can then initiate the upload. If the user clicks cancel from the dialog I would do nothing.So all I am trying to do her is make it so that the user does not see the text box for the file name and replace the plain old browse button with an image and do a postback if they click ok from the dialog.
I am using Visual Studio 2005. I have a gridview and when it is in edit mode, there is a locked textbox and an associated dropdownlist for the signature field. If a name already exists in the database, it will show up in the textbox. In that case, I would like to hide the dropdownlist.
So far, I have not been able to figure out how to make this happen.
My latest attempt is this:
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing meString = (CType(GridView1.Rows(e.NewEditIndex).Cells(2).FindControl("meSigLabel"), Label)).Text Dim meDDL As DropDownList = CType(GridView1.Rows(e.NewEditIndex).Cells(2).FindControl("edMESigDropDownList"), DropDownList) If meString <> String.Empty Then meDDL.Visible = False Else meDDL.Visible = True End If End SubI receive a NullReferenceError. During debugging, the mestring variable has a value but the meDDL is Nothing.What am I doing wrong?
In this place holder, I dynamically add a usercontrol (for each question in a survey). That usercontrol for now is just a simple Panel with a radiobutton. For the test, I have 2 questions, so the usercontrol will be inserted 2 times in my PlaceHolder.
On a submit button added in my Survey page, I try to retrieve the value of both the radio, but I just cant find the control.
I made a recursive function to loop through all the controls, I find the "PlaceHolder1" controls, but it has no child controls. Where are the 2 panels for each questions .. both containing 1 radio.
I see them on screen, but just can't find them in my coding.
I have a master page (frame.Master) and a content page (default.aspx) that uses frame.Master. Within frame.Master I have an ASP Panel control (pnlQuote). I do not want pnlQuote within frame.Master to be visiable when default.aspx loads. Normally I use the following code within Page_Load of the default.aspx.cs page: this.pnlQuote.Visible = false; however this does not work because pnlQuote is within frame.Master.
correct code to hide pnlQuote within frame.Master when default.aspx is loaded?