.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

extra entry on selectedindexchanged

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :ASP.Net
Hello all,I'm working on a project (nearly complete!). On my page I have several textboxes(Textbox1-5) and a couple of buttons. One button(Button1) is a submit button; the other(Button2) brings up another textbox(Textbox6) and a button(Button3). Entering information in that textbox and clicking that button(Button3) brings up a gridview. Selecting a row in the grid enters the ID of that row into Textbox6 (code below). It's set up (or supposed to be) so that clicking the submit button (Button1) will enter a row into a table; but when when I select a row to enter the ID into Textbox6, it enters a row then. So when I click submit, another row is entered. One thing to point out: I created a sequence (my database is Oracle) to automatically assign a PK. So my question: how do I keep it from entering a row in the table on the selectedindexchange? When it does this it is, for example, 10101 on the selectedindexchange, followed by 10102 on the submit button click, both entries containing the same information. I had a similar issue like this on this same page when I click one of the other buttons. I fixed it by setting Enable to False. Is there a similar solution to my current issue?Protected Sub GridView2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView2.SelectedIndexChanged        Dim row As GridViewRo

View Complete Post

More Related Resource Links

Basic Instincts: Dynamic Data Entry With XML Literals


Learn how to use Windows Presentation Foundation (WPF), XAML, and the deep XML support in Visual Basic to generate user interfaces dynamically.

Beth Massi

MSDN Magazine October 2008

Toolbox: User-Friendly UIs, Online Data Entry Controls, and More


Microsoft® Office is one of the most well-known and most-used consumer products. For many people, their only experience with a computer is when using Office, be it checking e-mail, creating presentations, or writing a document.

Scott Mitchell

MSDN Magazine February 2006

Vrooooom: How .NET and C# Drove an Entry in the DARPA Grand Challenge


Find out how the .NET Framework, a team of programmers, and a bunch of people from Carnegie Mellon University built an automated car to compete in the DARPA Grand Challenge. Along the way you get some inside tips on building an extensible real-time control architecture based on a whiteboard metaphor and implementing an accurate GPS-synchronized timer component for .NET.

John Hind

MSDN Magazine December 2004

Extra file is included on the Page directive inherits =



I am trying to understand where the additional file name is coming from in my Page directives Inherits

attribute like so :

inherits ="Track_Milestones2, App_Web_techsrvcs_track_milestones2.aspx.cdcab7d2"

Is the result of this app being published on my local server at one time or could this

page have been compiled on a server ?

Thanks for your insights !

TextField control add extra character space at end of it



On one of my publishing page layout i have added Content Field (field of content type) that is

<SharePointWebControls:TextField FieldName="MyName" runat="server"></SharePointWebControls:TextField>
"MyName" is single line text column in the content type.

Then i edit the page which is using this page layout and add one text "Sandip" in that MyName field. Now problem is, this filed show the text on the page but at the end of it, it add space. i.e- "Sandip "

I m not getting why it is showing this.

Please help..!

Regards Sandip Patil Sharepoint Developer http://www.worldofsharepoint.com

How to create a single entry page for site collections in MOSS 2007



I have  7 site collections containing a few hundred team collaboration sites. Some users are internal (intranet) but most are external (extranet). Extranet users are experiencing problems with losing links to their sites and forgetting which URLs to use. So I would like to create a single entry page that all users can enter after the logon process, which shows a list of sites they have permission to access, and other user-specific information. Perhaps relevant documents, tasks, recently modified documents etc.

I know this sounds like a 'My Site' but we want to use use a general welcome page instead. We use Windows authentication.
What is the best way of doing this and is it something that can be done in SharePoing Designer or does it need to be done in Visual Studio?

Many thanks in advance.

System.EntryPointNotFoundException: Entry point was not found. when unit testing html helpers


I'm trying to unit test a very simple html helper but keep getting the following exception:

System.EntryPointNotFoundException: Entry point was not found.

public static string AdditionalUsersDropDownList( this HtmlHelper helper, int additionalUsers )


Dictionary<int, string> items = new Dictionary<int, string>( );

items.Add( 0, "None" );

for ( int i = 1; i <= 30; i++ )


items.Add( i, i.ToString( ) );


SelectList list =  new SelectList( items, "Key", "Value", additionalUsers );

return helper.DropDownList( "AdditionalUsers", list );


Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.

Creating a custom drop down field type with SelectedIndexChanged Event

Hi All, I am trying to create a custom drop down field type and I was able to acheive that using the MS link http://msdn.microsoft.com/en-us/library/bb861799.aspx. As per the link, once the custom field is created we can override the "Validate" method to write the Validation logic and that works fine for me too. However I am facing a challenge even before going to Validate . Let me explain my actual requirements here. I need to build a custom drop down field and expose the field to the user in "Edit Properties " Page of a document library. Along with this field, I will be having some OOB site columns in the Edit Properties Page (Ex: Title, Subject etc)  . When user selects a value in the drop down, I need to hide/show few OOB site columns based on certain criteria.  I am facing a challenge of how to capture the "SelectedIndexChanged " event for the Custom drop down field in Sharepoint (Can we wire the SelectedIndexChanged event to a custom dropdown field type) ? Is this acheivable in SP 2010 Custom field type ? If so, how can I do it ? Can any of you kindly help me here?   Regards, Yesh

Collecting extra information using Create User Wizard

 I am trying to collect extra information about a user when the user account is created using the Create User Wizard. This info will be stored in a new table in the standard ASP membership SQL database. I have read several books and loads of online tutorials on the subject and they all take different approaches and seem to make the process hard work. Is there any reason why I can't add an SQL datasource and a number of textboxes  to the wizard step, 'connect' the values from the textboxes to the Insert Parameters and then put an Insert Statement in a suitable event handler to cause the insert? If this is possible what would be the best (ie simplest) way to 'connect' the textboxes to the insert parameters?   Regards Andy

Need help to search for extra space in all tables.

Hi, I try to search for data which has some extra spaces in ALL TABLES. Does any one know if there a tool that can do that or the scripts can return all the data (see desire results below). Thank you in advance.  SQL2008. IF OBJECT_ID('Tempdb.dbo.#T1', 'u') IS NOT NULL   DROP TABLE #T1 GO CREATE TABLE #T1 (   FullName   VARCHAR(30) ) GO INSERT INTO #T1 VALUES ('Joe  Smith') INSERT INTO #T1 VALUES ('April Smith ') INSERT INTO #T1 VALUES ('Peter Chen') INSERT INTO #T1 VALUES ('Kristine Nguyen') GO IF OBJECT_ID('Tempdb.dbo.#T2', 'u') IS NOT NULL   DROP TABLE #T2 GO CREATE TABLE #T2 (   FullName   VARCHAR(30) ) GO INSERT INTO #T2 VALUES (' John Smith') INSERT INTO #T2 VALUES ('Lisa Tran ') INSERT INTO #T2 VALUES ('Nicole  Ngo') INSERT INTO #T2 VALUES ('Brandon Lee') GO    SELECT *      FROM #T1;    GO       SELECT *      FROM #T2;    GO -- Desire results. FullName         TableName ---------------- --------- Joe  Smith       #T1   (2 spaces in between) April Smith      #T1   (space after Smith)  John Smith      #T2   (space in front) Lisa Tran  &

Is it suggested to have extra column on the SSISConfigurations SQL Configuration table

Hello, I have all my configurations are saved in SQL Server table. SO I just wanted to know if it is advisible to have extra column on that table? Thanks, Prabhat

T-sql help !!!!! in order to display those extra rows in report....

SiteName SiteID RptSeq     ReportLabel Amount ReconYear     ReconMonth SanAntonioTX 43    1        Aging Prior Month 4763943 2010     8 SanAntonioTX 43 2   Invoices 1542323 2010      8 SanAntonioTX 43 3 Credit Memos -8081.31 2010      8 SanAntonioTX 43 4 Cash Collected - Invoices and Payment on Account -1883460 2010      8 SanAntonioTX 43 5 Katz I/C Payments -174310 2010      8 SanAntonioTX 43 6 NSFs -250 2010           8 SanAntonioTX 43 8 Aging Current Date Selected 4245716 2010      8 Hi My table has these values I need a row where it takes the sum of amount where rptseq <> 8 and rest of ther columns will be same and report label would be SUmOfAmount and there should be another column which wuld be amount of new added row - last row amount where rptseq =8 so these rows i need how is it possible..... please its urgent !!!!!!! if anyone needs extra description please feel free to ask me...

Data Entry

hi... my  requirement is to enter details like tyrenumber,purchasingdate and guarantee for each tyre in a vehicl,.the total number of tyres may vary from 2 to 12,which data controls shall i used to populate my database.. Thanks in advance

What is the best way to add an extra row to the bottom of a listivew for such things as totals, etc.

 I can add a row to the bottom of a listivew by inserting a table after the layouttemplate in a listview.  It works fine for me to call the added controls from code-behind and chane the control values. Since my listview changes width dynamically depending on the contents of the data, my added table columns don't match up.  I have tried to access the width property of the table and then match the new ones with codebhind, but it doesn't seem to work. I am simply trying to add a row to the bottom of the listview to provide for totals of the columnts.  What is the best way to to that?   Thanks

extra xml attributes in infopath form xml?

I have lot of fields on the form. When I looked at the xml data InfoPath form saves, it looks like: <my:field1>value1<my:field1> <my:field2 xmlns:my="https://schemas.microsoft.com/office/infopath/2003/myXSD/2010-08030T14:37:56">value2</my:field2> Some fields also show attribute xmlns:xsi="......". Why are they not consistent? With the extra attributes, simple XPath query in my Sharepoint workflow to extract values from the xml (I am using http://spdactivities.codeplex.com/) will not work   Any ideas,    
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