AJAX :: Using The Rate Control Without A Submit Button?
Feb 15, 2010
I'm trying to get this to work. My current problem is what to do if the user wants to give the same rating that already exists. For example, an item has a rating of five, and the user wants to give it another 5 rating.
I have this working except for one thing. After the user has voted I want to replace the submit with "Thank you" text.
In the aspx page I have a label that is not visible, with the text = "NotVoted". This label is not in the listview. In the listview I have a label that is not visible and a button that is. The rating control is called vidRating. In the vidRating_Changed event I have
lblVoteStatus.Text = "Voted" ListView1.DataBind() In the ListView1_ItemDataBound event I have Dim lblVoted As Label = CType(e.Item.FindControl("lblVoted"), Label) Dim btnSubmit As Button = CType(e.Item.FindControl("btnSubmit"), Button) If lblVoteStatus.Text = "Voted" Then btnSubmit.Text = "Thank you" btnSubmit.Visible = False lblVoted.Visible = True End If
When I run this in debug mode, if the user has voted, ListView1.DataBind() is run, lblVoteStatus.text = "Voted", and the code in the IF statement is run. I get no errors, but the page doesn't change. I still see the button and I don't see the label text. If I comment out the if /end if statements, the page opens displaying the label text, not the submit button. So the controls are being found ok. What am I doing wrong? How can I disable or remove the submit button after the user votes?
After entering username and keying enter key(from keyboard) it was not firing submitbutton_click event. So i have added defaultbutton property in the panel control, and it is working fine. And my problem here is..
Clicking on submit button it is showing security question. After answering the security question, i have to click on the submit button either by mouse click or tab enter.
What i need to do is.. after answering the security question, I should be able to hit enter key instead of mouse clicking on submit button.
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 5 questions to rate a product. These questions are in the database and I disply these questions to the customer in a GRIDVIEw. In order to make the rating easy, I give a tool like this- This tools is part of GridView in a TEMPLATE Field. A set of 5 stars will be available against each question. The user can rate each question by selecting the stars. Now, when the user clicks on the SUBMIT button, I want to receive the 'CURRENT RATING'. At present I am giving- Rating1.CurrentRating But, this doesn't give me any value because the rating tool is inside GRIDVIEW1. So, what changes should I make in Rating1.CurrentRating to receive the current rating value.
I have a modalpopupextender with popupcontrolid set to a panel. I have a name textbox, label, submit button in the panel. When the submit button is clicked the name is validated using a function connecting to the DB. If It already exists the label should show "Already Exists". I have set the label text in the buttonclick event handler but the label is no set. The popup just closes. I want the label to be set and make the popup remain unclosed. How to achieve this functionality ?
I would like to hide a submit button if a DataList is empty. I don't really know the code. If you submit an answer please show me the code also. I have to do it in VB.Net. I googled and found the following code that I place in the code behind under the Page load event.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim dv As DataList dv = SqlDataSource3.[Select](DataSourceSelectArguments.Empty)
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.
I am working on a project in ASP.NET MVC using C# 3.0.I am using the Dundas Chart Control for OLAP. As the Dundas control does not directly support MVC it is used on a standard ASP.NET page with a codebehind file. This page is displayed in an iFrame of a normal View returned from a Controller Action.I have a button in the iFrame which submits a form via Ajax (using jQuery) to a method on the controller. I have also written an extension method for the OlapChart which returns the XML of the current report.What I am looking for is a way of getting the XML produced by the extension method to the Controller Action which handles the Ajax submit.I have only developed using ASP.NET MVC so I may be missing something obvious with Code Behind and ASP.NET controls.
I'm using Multiview control in my web page, and I'm using 3 view blocks inside the Multiview. In each view I have some text boxes with validation controls. In my 3rd view I have a submit button. If I press the submit button without enter any values in text boxes, it accept the empty value the Required validator control didn't work.
I use Only one Submit button for a all 3 views....
I have webpage containing 3 views of multiview control. In the first view there are 3 fields Name Age Surname which will be captured in the textbox for the respective fields.In the second view i have three more fields
sex maritalstatus bloodgroup
which will be entered in the respective textboxes and a submit button to store the data in both the views in the sql server database. I have all the fields in the sql server table which are mentioned in the webpage.I need the complete code for storing the entered data in both the views of the multiview control after hitting the submit button.
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:
UpdatePanel1 contains a gridview1 and a standard panel, pnlForms. gridview1 has a linkbutton which is processed in the gridview1_rowcommand
UpdatePanel2 has gridview2.
There is also a Submit button that isn't in either UpdatePanel but may be a candidate to go into its own UpdatePanel. The Submit button is a trigger for both update panels
The behavior I would like is:
1-Initially, all visible except pnlForms and Submit button 2- When linkbutton in UpdatePanel1 gridview1 is clicked, pnlForms and Submit button become visible. 3. When Submit button is clicked, both gridviews should be refreshed, and PnlForms and the Submit button should both become not visible. I believe I may have to put the Submit button in its own UpdatePanel3 but am not sure how to proceed.
In my present code, everything works as desired except Submit button (not presently in any Update panel) is always visible. Assuming Submit button is initialized to not visible, how do I get it to appear when I click the link button in gridview1 and to disappear when it is clicked?