Web Forms :: Skins Not Working - Change Colour Of Submit Button
Jan 25, 2011
I have never used skins before, so I went online and found some samples. I am trying to get ANY skin to work, so I have an incredibly simple site, a master page, the default.aspx, the skin file. I am missing something because as near as I can tell my skin file is set up correctly and I THINK I am doing it all correctly, but the skin file / contents seems to be ignored. Here is the master page, all I am trying to do is change the colour of the submit button. I figure once I get the skin recognized the rest should be easy...
[Code]....
My default.aspx has NO changes to it. I created a new one added nothing so I am not displaying it here. In my App_Themes directory a new folder called 'First' was created. In that folder is a file called 'First.skin'. The contents of First.skin is: [Code]....
Maybe there is something in the web.config that the people who made the samples assumed I would know about... not sure.
For eg..in Stackoverflow site, after giving answer, if we are refreshing the page, it displays the answer with orange color and turns to white beautifully?
How we have to do this ? Can it is possible in asp.net - C# ?
I have three drop down lists that are all databound to a gridview. When the user selects 1. a school, 2. a house number, and 3. a street from seperate drop down lists, bus stops for that address are displayed in a gridview. Everything works fine. After the user selects a valid school/house number/street combination the gridview automatically displays. I would like to add a "Submit" button and not have the gridview display until this button is clicked.
I have a gridview and I use a sort function there, which means that if I click on the header of some column the table is sorted by this column. What I need is to change the colour of header of column which I sorted the table by. E.g. if I sort the table by first name, I click on the header of column called "first name", then the table will be sorted by first name and the colour of the text "first name" will change. The sorting is not a problem but I don't know how to change the colour of text.
I am trying to highlight a cell in a DetailsView if the value displayed is either "Desktop Computer" or "Laptop Computer" say red, I seem to be able to find examples for gridview but I don't seem to be able to apply this to a DetailsView.
I have a grid view that displays some diary data that consists of a date, a diary entry and a diary entry type (eg holiday, info, meeting..)How can I change the background colour of a row depending on the diary entry type.So for example if the type is 'holiday' colour the row yellow, if its 'meeting' colour it red etc etc
I have implemented master pages using this example How to implement a status bar in an ASP.NET application?. I have a property on my SiteMaster.cs inherited MasterPage called Environment. On my MasterPage.master I have this code:
<body> <form id="frmMaster" runat="server"> <.. some content removed for brevity ...> Environment: <%= this.Environment %> </form> </body>
What I would like to do is evaluate this.Environment and if it is "LIVE" then colour the background of this.Environment text red, and if it's "TEST" colour it yellow. How would I do this?
UPDATE I've just added this code to MasterPage.master
The page loads, but the text does not get set, it's blank! Also the old text, that was populated is now blank too (I left the old code there for now). I also get a warning in Visual Studio:
'ASP.masterpage_master.Page_Load(object, System.EventArgs)' hides inherited member SiteMaster.Page_Load(object, System.EventArgs)'. Use the new keyword if hiding was intended.
UPDATE2: This is what I have in SiteMaster.cs
using System; using System.Web.UI; public class SiteMaster : MasterPage { public string StatusText { get; set; } public string StatusTime { get; set; } public string Environment { get; set; } protected virtual void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { if (Session["status"] != null) { this.StatusText = Session["status"].ToString(); this.StatusTime = Session["statusTime"].ToString(); } this.Environment = Session["environment"].ToString(); } } }
Initially I am doing validating form by clicking on btnOK and in btn_Submit I am inserting record into table. I again want to call btn_Ok event in btn_Submit click event for re-checking validation, if it validates properly thne rest of code of btn_submit should work.
The dataGrid view is being populated. The Autogeneratedcolumns is set to false. How do I change the colour of a cell of a row depending on the text? i.e. Row 2, column 5 says "Failed". I would like to change the colour of that cell to be red.
I'm serving up PDFs from a SQL db and presenting them in the browser. I'm trying to figure out a way to embed a number in the PDF dynamically so that the recordID for that PDFs SQL record is available to me when the user submits the XML form data. The user hits the submit button on the form and the form submits its XML data to my submission page. If there is some way of changing the submission URL on the fly then I could do a query string to pass my self the recordID. I'm not generating the PDF in code, its being created by hand and then uploaded to my site.EditUser is given a link someServer.com/pdfLink.aspx?formID=5 they go there and that pages pulls a PDF from the DB and displays it. This pulls up acrobat in browser full size so my aspx page isn't in control of submitting the completed form, Acrobat is. The user fills out the form and hits the submit button in the form. This submit button was set up at form design time to point to another page someSite.com/pdfSubmit.aspx The submit button posts the XML data to that page and I can process it. I need the recordID in the query string for the someSite.com/pdfSubmit.aspx page. To do this I would need to modify the PDF to either add the recordID and query string to the submit button's submit URL, or embed it in the PDF else ware. The big question is how do I modify the PDF just before I display it via someServer.com/pdfLink.aspx?formID=5 to do either of these two options.
I have 2 SUBMIT button in a form one is display:hidden and one is display:block if user click on SUBMIT button (display:block) then another SUBMIT button {display:hidden} should also submitted.
In ASP.NET when we have multiple input section with required field validator (Like on header for login with userid & Password is required and second on footer for subscription) when we click on subscription login section's userid required field validator activates and say userid required & i can not submit subscription.
when i submit subscription details login section should not have concern with this. how to avoid this conflicts.
I have 3 tabs with 3 seperate gridview and radios buttons in them. Each page has a seperate submit button, but for some reason each pages submit button is validating all the radio buttons on each tab, i picked the seperate controls to validate under but on any submit theya re all validated instead of just the ones on that tab.
I have a databound Gridview (with a LINQ datasource). The gridview displays questions from the SQL DB to the user. I've inserted a radio button list into the gridview with 3 horizontal radio buttons with fixed values of 1,2,3 for the user to select. I have a question ID, a tempuserID, and AnswerValue columns set up in the database. It all works nicely.
After the user selects radio buttons, I would like for them to push a button to submit the QuestionID, the associated Radio Button Value (AnswerValue) and their tempUserID into the DB. How do I do this? I'm not sure what to do next and what VB/LINQ code to put in the code behind file in the button click event handler. I'm also not sure on what to use for the tempUserID, can I use the sessionID? I'm using VB and here's my code: