.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Validate two buttons and two textboxes on same page.

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net

I have a two textboxes on the same page with their corresponding buttons to enter the data and both the textboxes require validation.

The problem is that if any of the two buttons is clicked it causes client side validation. What I want is only corresponding button shud cause validation.

View Complete Post

More Related Resource Links

Validate different controls on different buttons in a same page

Normally developers have a requirement to validate different controls on different buttons in this situation developers face problem when user click on any button all validation will be fire which are not belongs to that button functionality.

Create buttons for "new item" which create a new page of a specific content type

We have a Pages library (wiki) which supports a few content types (and page layout associated). We want to enable users to click a button for example of "new custom enterprise wiki page" - so a new page of content type article will be open in edit mode. Can someone help how to develop? (it has to mimic the behavior that happens when user creates new page from the Ribbon or Site actions and has to choose the content type, it also has to keep the new page in edit mode and not just create it).  

Using Wizard To Pass Parameters From Page With No Buttons?

I'll start out by saying that I am kind of new to the Wizard control.  What drew me to it, was the fact I didn't need to pass variables between pages with the traditional methods.  Now I am faced with a situation where I may have to use those methods.On Step 2, I have a handful of LinkButtons that look similar to this... <asp:LinkButton ID="LinkButton113" CssClass="ListingItem" OnClick="boxChanger" runat="server" Text="Tree Services">Tree Services</asp:LinkButton> The sub boxChanger is this... Sub boxChanger(ByVal sender As Object, ByVal e As System.EventArgs) Dim s As LinkButton = CType(sender, LinkButton) Dim hd1 As HiddenField hd1 = CType(TemplatedWizardStep2.ContentTemplateContainer.FindControl("hdLinkItem"), HiddenField) hd1.Value = s.Text Wizard1.ActiveStepIndex = 2 End Sub I figured I could hide the item in a hidden field control before transfering over to the next page by changing the activestepindex.  That's not the case.  The first trip through the steps, I never retrieve the value in Step 3 from the hiddenfield.  However, if I called boxChanger to get to Step 3, use the previous button (buttons are visible on Step 3) to change index back to Step 2, then c

Page Layout and Text Layout Buttons Disabled on Ribbon

I am trying to create a publish site in Sharepoint 2010, and I am using the Ribbon control.  Currently, I am having trouble adding and changing content on my site, due to both the Page Layout and Text Layout buttons being disabled.  I have been trying to figure out what security or feature needs to be active to get these enabled again.  Any help would be appreciated.

Internet Explorer Go back one page and Go forward one page buttons are disabled.


I have a .aspx page in my web site that when I run it the internet explorer back and Fotrth Buttons are disabled. Any Idea what could be causing this functionality.

Textboxes get filled when page is loaded


I want to make a profile page, so the first time the page get loaded they can fill in there profile page. 
Iff they come for second time the page will load the information out of the database and put it into the textboxes.

Does anyone know how i need to put that information in textboxes...?


Master Page/Content Page - Multiple Submit Buttons / ViewModels ? Best practise?



I wanted to ask, what would be the best mvc practice to get the following result:

I want to create a mvc website with one master page and several content pages.

There are some parts on the master page (besides the header and footer) on the left side, that should be available on every content page.

So I guess it makes sense to put that stuff inside the masterpage. These things are several panels. There is one panel with a search field and a search button. Another panel should retrieve data from an own viewmodel, that displays content related data to the user.... and there are another 2 similar panels.

So I thought I could create for those 4 "panels" 4 parial strongly typed views with their own ViewModels. Then implement them with RenderPartial on the Masterpage.

But I realized, that this causes a lot of problems in mvc. First I realized, that I am having problems that the viewmodels behind the partial views are different to the viewmodels of my content pages.

Then I realized that I have anyways problems with more than one submit button. I read now a lot of different solutions on similar cases and now I really dont know, what would be a very "pretty" solution for my case.

I think this is not something very rare that someone is having a searchbox with a search button shared for all pages, because I read

How to hide ribbon buttons in a publishing webpart page?



I'm trying to hide some ribbon buttons from a publishing web part page(a page thats url ends with: /pages/default.aspx), and i just can't seem to do it.

I created a feature with custom actions to hide the buttons but it doesn't work for publishing web part pages.

Can someone give me a working example on how to hide the Make Homepage button from a webpartpage?

Here is the code i used that's currently not working, in 3 different formats, neither of them works for me:


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

whenever add custom(page viewer) webpart to the site why custom buttons disabled?


My custom buttons are disabled when ever i am try to add page viwer webpart to the site.

please send the reply...


Validate textboxes from a User Interface in a web setup package


Hello and thanks for the help you might give me in advance.

I have a created a Web Setup Package and i wonder if its possible to validate the input from a user within a textbox on a certain Form/GUI during the Installation process. So for example let's say that the installer needs the information of the Database server and the user must provide a name into a textbox but he doesn't.

How could i show a MessageBox letting the user know that this field must be filled before continuing with the next step of the installation process?.

I have created a CustomInstallClass which i use to perform some installation logic, but i don't know how to request an event and control input on a particular Form within the package.

Would be great to get some advise on this.

Thanks again!.


How to hide top or bottom buttons on upload page



We are on a project with MOSS 2007, and our client request that to remove one of the bottons on top or bottom on file upload page.  The upload page displays check in and cancel button on top and bottom twice.

I would like to knwo if there is a way to hide check in and cancel button on upload page either on top or bottom.

validate plugin on a content page dialgbox


Hi, I am trying to implement the jquery validation plugin. I have successfully used the plugin directly on a form but I am having some trouble with the plugin on a dialogbox that is launched from a content page inheriting from a master page. Nothing happens when I leave the message field empty and click on the Send button, it just emails without the validation. 

Here are steps I have taken:

Step 1. Referenced the scripts and CSS as needed for jQuery and the validation plugin.

    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>
    <link href="css/cupertino/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.validate.js" type="text/javascript"></script>

Step 2. Added the class required in the mark up in the dialog box. Here is the snippet:

                <td colspan="4" >

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Gridview with Radio Buttons

As now, Radio buttons are HTML controls, I am not able to get it on server side. When user select any radio button and press submit, Control will not available at code behind, you can use "e.Item.FindControl" as it is not "runat='server'". I want ID "Primary Key" value for selected radio button. To achive this I took the help of Javascript. I wrote javascript function that sets the values of "Primary Key" in hidden field when user clicks on any radio button. Now when user clicks on Submit button, user can get selected value froim hidden field.

add columns with textboxes in gridview using C#

'm working on a shopping cart in a website and I have my items(which have been added to the cart) in an arraylist. And using these values I've read the rest of the values from the db and and have populated on the gridview successfully.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend