.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

MsgBoxYesNo I want to open two different forms when either yes is clicked or no is clicked. I have e

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Windows Application
Private   Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox( "Nickname?", MsgBoxStyle.YesNo)   If DialogResult.Yes Then Form3 = Nothing Form3.Show()   End If   If DialogResult.No Then Form9 = Nothing Form9.Show()   End If   End Sub

View Complete Post

More Related Resource Links

MsgBoxYesNo I want to open two different forms when either yes is clicked or no is clicked. I have e

Private   Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox( "Nickname?", MsgBoxStyle.YesNo)   If DialogResult.Yes Then Form3 = Nothing Form3.Show()   End If   If DialogResult.No Then Form9 = Nothing Form9.Show()   End If   End Sub

What is the best way to dynamically create a scrollable list of forms that when clicked expand for e

Hello, What is the best way to dynamically create a scrollable list of forms that when clicked expand for entry? More details: In my XAML I have a TabControl. One particular TabItem looks like this:   <TabItem Name="Tab_Forms" Header="4" Width="50" Height="20" Background="{x:Null}" BorderBrush="{x:Null}"> <Border Name="Tab_CategoryTabSelected_Border" BorderThickness="10" BorderBrush="Transparent" Padding="3"> <... What do I use here? ...> </Border> </TabItem> At the location <... What do I use here? ...> I need some sort of scrollable control.  The scrollable control can be part of the XAML above. However, the contents of that scrollable control will be entirely code generated. Within that scrollable control will be a vertical list of forms by name with an expansion/contract button next to the name.  When the user clicks the expansion button, the form expands into view, and may be longer than the viewable area, and the user will need to be able to enter data into the entry fields.  I need the tab key to go from field to field as would be expected. If the user is on the last viewable field and there are more fields below, when the user hits the tab key, the for

KPI to calculate list item clicked most ?


Hello All:

Is there anyway where we can use KPI list to attach to a SharePoint list and indicates which item was clicked the most ? Or any other way to find out the best 5 links based on how many times they were accessed by a user?


Thanks in advance

SharePoint Developer

ReportViewer DatePicker Parameter - calendar not displayed when clicked

Hi, I'm using VS2008 ReportViewer control and one of my reports in SSRS 2008 R2 has a DateTime parameter. I can enter the date into the textbox and view report successfully. However the calendar is not showing when I click the calendar icon. (Note: I encounter NO error).  It seems that it's a known issue in Visual Studio. Anyone knows any workaround/hack to fix this issue? Thanks in Advance, Raymond

how to fill asp:Gridview when mouse clicked on AJAXToolkit Calendar

how to fill asp:Gridview asynchronously from the SQL database when mouse clicked on AJAXToolkit Calendar(When calendar date changed by client) Pls Help me out.Hoping for quick response Thanking You

getting error when i clicked on doucment library

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) plz help

Code Behind (C#) - Postback - "If (this button was clicked) postback to this address, otherwise, do

Hello!!I have three buttons at the bottom of my form. Two of the buttons make the form invisible and make a Success message Visible.I need all three buttons to call SubmitForm Function to send us an email with the completed form.The third button is a PayPal button which I would like to postback to a different url after submitting the form via email.How can I change its Postback url in C# in the code behind.P.S. I tried Server.Transfer... got an errorThanks

who to open 2 forms in my page

Hi,I have a main page that contain a button...so if you click this button I want to open a form(small page) in the same main page (at the left for example)...this small page contain a DopDownList...and Ok button.....when you click this button the value of dropdown will print in main page...Like when you will choose smile in this forum..The same Idea who can I do that ??

Disable a link button in grid view after it is clicked

I have a grid view with each row as a link button. When I click on the row, some data parsing process takes place (about a 15 sec process). The grid refreshes itself at a regular interval. I want to disable the link when it is clicked once, so that the user gets to know that row has been processed already and does not click it again, until the grid refreshes itself and the row disappears. I am copying my gridview code below. Please give me some idea on how to disable the link button on that row as soon as it is clicked.Thank You. <td rowspan = "4" valign = "top" > <asp:Label ID="gvOrdersQueueLabel" runat="server" ></asp:Label><br /> <asp:UpdatePanel runat="server" ID="updatePane1"> <ContentTemplate> <asp:GridView ID="gvOrdersQueue" runat="server" OnRowCommand = "ParseOrderMessage" EmptyDataText="No Cases Found" BorderStyle = "Double" AlternatingRowStyle-BackColor="Beige" EnableViewState="false" AutoGenerateColumns="False" HeaderStyle-Height = "20" RowStyle-Height = "20" AllowPaging ="true" PageSize = "20" OnPageIndexChanging="gridView_PageIndexC

How to get row value when a row is selected or clicked in gridview

Hello, I have a gird view,which has only one field displayed,and a text box. (Grid view has 2 data rows.) On the gridview i have a button field named "Detailed View" which has command name "Detailed". When i click on the row 1 i wanted to display the value on the text box How will I execute it? I have given the following code but its not giving me the expected result.textbox1.Text = datagrid.Rows(e.CommandArgument).Cells(0).Text) and on the gridviews _RowCommand event Its showing null I am using VS 2008 (.net version 3.5) AND MS ACESS DB In visual studio 2005(.net 2.0) the same code is working absolutely fine ThanksNick

Content cutoff in Print preview screen when a print button is clicked from a WPF application in Dell

Hello, I am facing a problem in printing.. I have a WPf+windows application running on the Dell Mini Net book(10") with screen resolution 1366 x 768. I am trying to the print the page with heading, image & some measurements on a 81/2 x 11. the print preview seem to be ok on the desktop(screen resolution 1440 x 900). but when i run same application in dell mini the layout is cutoff, the text is started from the footer area,  the page is not shown completely.. Can any one help me in this regard??   Thanks for the help in advance Archana

Creating views on a form does not allow Hyperlinks to be clicked.

I have successfully created an Info Path 2010 form which 5 views.  On each view it has a raft of information, on some of the views they are multiselect items to other sharepoint lists.  This is the basic make up of the form. The form is about Software Application information. Page 1 is General Information Page 2 Environment Page 3 Support This form is the form that opens for the SP list called Software Applications. When I open this list it shows the Software Application list as expected.  When I click on one of these applications it brings up the form mentioned.  The problem is, when the form loads it does not show the other views, so I am unable to change views.  If I am to change views I must first select EDIT and then the views are available.  The problems is when selecting the other views I can not select the hot links to the other items.  This is a major pain.  The only way I can see around this is only containing one view with the information broken up on one huge page. :(  Any ideas?

Sharepoint 2010: Browser compatible infopath forms are not open in web browser for editing


I created a browser enabled form with InfoPath 2010. I then published the form by selecting the option "Publish form to a SharePoint library" and then selected "Form library" and finally selected "Create a new form library". As a result, a new form library was created.When I click on "add document", the browser opens a new form, which I can fill and save successfully. However, after the form is saved, whenever I click on the form name in the form library to edit it, the browser "opens with" dialog box opens, asking for an XML editor software. In other words, the form does not open in browser for editing even on systems that do not have InfoPath installed.

The form is browser compatible and the form library is configured to open browser-enabled forms in browser. The issue is that the form hyperlink is directly pointing to form XML file rather than pointing to InfoPath form services URL.

I would really appreciate, if someone tells me how I can edit the form in browser.




Accordion panes do nothing when clicked


Hey guys,

Hopefully this is just me missing something really simple; I have 3 accordion panes of which the first one is visible on page load but if I click on the other panes nothing happens.

Here is the code I'm using:

<ajaxToolkit:Accordion ID="Accordion1" runat="server" FadeTransitions="True" 
SelectedIndex="0" TransitionDuration="300"  HeaderCssClass="accordionHeader" 
    <ajaxToolkit:AccordionPane id="AccordionPane1" runat="server">
        <Header>THIS IS THE FIRST PANE</Header>
            TEST<br />
            TEST<br />
            TEST<br />
            TEST<br />
    <ajaxToolkit:AccordionPane id="AccordionPane2" runat="server">
        <Header>THIS IS THE SECOND PANE</Header>
            TEST<br />
            TEST<br />
            TEST<br />
    <ajaxToolkit:AccordionPane id="AccordionPane3" runat="server">
        <Header>THIS IS LAST PANE&l

create polyline size relative to image clicked



i am creating a path geometry using polyline:


 System.Windows.Point Point1 = new System.Windows.Point(50, 10);
      System.Windows.Point Point2 = new System.Windows.Point(200, 10);
      System.Windows.Point Point3 = new System.Windows.Point(200, 100);
      System.Windows.Point Point4 = new System.Windows.Point(10, 100);
      System.Windows.Point Point5 = new System.Windows.Point(10, 50);
      System.Windows.Point Point6 = new System.Windows.Point(50, 10);
      PointCollection polygonPoints = new PointCollection();
      yellowPolyline.Points = polygonPoints;

this is a rectangle which is clipped from top-left,

actually i want to create dynamically a polyline whose size is relative to the image i click on the canvas 

and then apply than clip that image using that polyline,,so that the image looks clipped from top-left

how can

Find out if DatagridView Cell is Clicked


I have 2 grids on a form.

Both grids are binded to object Panel and PanelLines.

If user click first panel grid, the second panel line grid will show the related panel lines.

If the user clicks the panel grid on the same cell again, I want panel line grid to scroll rows as such visible rows hide and bottom rows show up.

The following code does the scrolling part.

dgvPanelItem.FirstDisplayedScrollingRowIndex = dgvPanelItem.DisplayedRowCount(False) - 1
But I need help in finding out, if first grid ( panel grid ) is already clicked or not.

How can i check if button clicked inside a button click event?


private void View_Log_File_Click(object sender, EventArgs e)
                processNotePad = System.Diagnostics.Process.Start("notepad.exe", path_exe + @"\log\logger.txt");


It was easy to check it inside a checkbox event for example:


private void Show_satistics_CheckedChanged(object sender, EventArgs e)


             if (Show_satistics.Checked)
                     statform = new StatisticForm();

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