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


Top 5 Contributors of the Month
satyapriyanayak
SP
Sambanthamoorthy
Swati Kadam
Ashutosh Jha
Post New Web Links

Open another Form from my Main form using a button click

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :Windows Application
 

Hi All

 

I have seen this question asked and answered several times but it doesn't seem to be the question. I have.

 

I have just created a new project I renamed form1 to FrmMain and then I created a new form by clicking add new form and I named it Report

 

I then went to my FrmMain and dropped a button on there from the toobox. I now need to open Report.cs when I click the button.

 

I have tried               Report Form2 = new Report();

                                Form2.ShowDialog();

 

But all that does it open a new FORM and its not my Report Form. It also just keeps opening new forms every time I click the button. My thought is that the user will enter a ID then click the button then the report form will open and I will then create a query to populate a data gride or view using the ID form the text box on FrmMain.

 

Please help.... I am new to this so shoot it straight as if this was your first forms application that you created.

 

Thanks




View Complete Post


More Related Resource Links

Infopath form using Visual Studio - How to bind repeating table on submit button click ?

  

Hello friends,

   I have created infopath form using Visual Studio 2008

Form have 3 dropdowns and one repeating table which is bound by Datasource ( List from sharepoint ).

whenever i select appropritae values from drop down, Repeating table gets bound as datasource for dropdown and repeating table are same.

I have done conditional formating for repeating table using repeating table properties.

 

My Question:

 

Now i included one submit button and i want when i click submit button it will check DropDown Values and if appropriate record matching these values found it will fill repeating table

How i achive this ? as i dont find how to bind repeating table on submit button.

Please help if anyone have answer.

 

Thanks and Regards,

 

Kapil Bhosale.

 

 

 


click a button to print current window form

  
how can i click a button to print current window form? i don't know how to set and define something? anyone give me example for my reference   thanks.

OK button click on Windows dialogue form not triggering click event

  
I have created an Add-In for Outlook 2003 in Visual Studio 2005. When a new message is sent and a toggle button is selected, a form that I have created will be displayed as a dialogue box, where further information can be entered. Once this information has been entered you can click the OK button and the message is sent. If you were to click the OK button with invalid data in the form, there would be a message box with an error message. This all works perfectly on my development machine but when I have packaged the Add-In and installed it on other machines it does not work. Clicking on the OK button does nothing, there is not even an error message. All the prerequsits are successfully installed and this is the only part of the Add-In that does not work. All help greatly appreciated. Thanks Nick

Need help on Main Form Open Child Form

  
Hi, I've 2 form which is frmA and frmB. frmA have a 1 button and 1 label named Button A and Label1. frmB have a 1 button named Button B. frmA is a Main Form. frmB is a Child Form for Form A. My objective is when frmB is closed, then Label1 in frmA showing the value. My code in frmA as follow public partial class frmA : Form { public frmA() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { frmB oFrm=new frmB(this); oFrm.ShowDialog(); } public void PerformRefresh() { label1.Text = DateTime.Now.ToLongDateString(); } } My code in frmB as follow, public partial class frmB : Form { frmA _owner; public frmB() { InitializeComponent(); } public frmB(frmA owner) { _owner = owner; this.FormClosed+=new FormClosedEventHandler(frmB_FormClosed); } private void frmB_FormClosed(object sender, FormClosedEventArgs e) { _owner.PerformRefresh(); } } At this level, i can call function in frmA from frmB after closed event. My problem is when Button A in frmA clicked, frmB not showing like frmB as per design. It's display a windows without Button B. I'm stuck. Really need help

How to redirect Infopath form programmatically on button click

  

I am having an issue with infoPath Forms and C#, 
I have a 1st form open to the user, and when he click a button it opens a 2nd form.

Sounds pretty easy, but I have tried many ways and still error.
(environment is InfoPath Forms 2007 in Sharepoint and code: C#)

this is what I have:
- form1 . a text field where I enter the URL of form2
            . a button with code below

The issue is that if I type the URL of form2 
(http://sharepointserver/sites/MySiteCol/Myinfopath/_layouts/FormServer.aspx?XsnLocation=http://sharepointserver/sites/MySiteCol/FormServerTemplates/form2.xsn&SaveLocation=http://sharepointserver/sites/Myinfopath/InfoPathLib)
 in the text field and press the button I get this error
"Critical Error : An error occurred submitting this form to the Web server. The form will now be closed."

But instead of the URL of form2.xsn I type http://www.google.com/ they it works (w

how can i load a window1.xaml form from click event fuction of a button

  
how can i load a window1.xaml form from click event fuction of a button

"New Document" button on Form Library fails to open a new document

  

I have just finished installing sharepoint server standard edition 2010. I did a server farm installation using SQL 2008 on Windows Server 2008 R2. I did not run the farm configuration wizard. I have manually setup User Profile Synchronization and Search Service Applications. I then created a web application and site collection to play around with. I created a Form Library for some Infopath forms I had and set the template. Now when I attempt to create a new document for the form library I recieve the following message

"This feature requires Microsoft Internet Explorer 7.0 or later and a Microsoft SharePoint Foundation-compatible XML editor such as Microsoft Infopath."

I have the site collection configured to open files in their client applications by default.

This behavior occurs in all of my document libraries as well. I have also noticed that sharepoint doesn't appear to recognize what type of office file the library template is using as the new document icon is always just a blank white page instead of the miniature office word/excel/infopath icon.

Any insight into some setup steps I have missed or anything would be helpful

Thanks,

Benjamin



Reg: Turn on more accessible mode & Skip to main content link message on Infopath2007 browser form

  

Hi,

I have a infopath 2007 browser enabled form with c# code behind . The Infopath form is embeded\hosted in to a custom layouts page (.aspx) on MOSS 2007. The issue is when users use keyboard to fill the form, they often use <TAB> & <Enter> keys. So when they are using the tabbing at one location in the form, I have a "Contact selector" field, I enter a name & then hit <TAB> key the focus now comes to "name cheker" I then hit <Enter> key, I hit <TAB> again, the focus now comes to a button named "Accept", I hit <Enter> key & a filed below is populated with the values from user profile service. Now when I hit <TAB> I expect the focus should now come to that automatically populated field below the "Contact selctor". Because Infopath assings the tab order by default form top to bottom & left to right and I havent changed that default tab order.   

But, the focus moves to top of the webpage with a clickable link to "Turn on more accessible mode" I hit tab one more time & the link on top changes to "Skip to main content". This bheaviour does not seem to be happning in other form controls when they hit <Tab>, <Enter>. There are couple of areas on the infopath form where I have such a controls (layed ou

Infopath 2007 print view in browser enabled form with Print button

  

Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?


Button in a form that does not submit

  

I've been trying to figure this out all afternoon but my google-fu seems to be failing me. I'm setting up a page with a fairly large form, which has one field that is going to require some kind of popup page that will allow the user to perform a lookup. At the moment I'm only prototyping the page so I'm actually only attempting to a the button up to fire an alert when the button is clicked instead of generating a lookup screen. However it seems that no matter what I do the button causes the form to submit.

I remember one of the very first ASP .NET beginner videos I ever watched went through configuring a button to perform actions without submitting, but I can't seem to figure out which one it was.


Open a windows application form names in another

  
Hi, Now i am in a horrible situation. I want to create an application for open another application(exe) and display all the form names in newly opened application in a compobox.If we selected a compobox item,ie;a form name in new application opened,i want to display all the control names in that form... is it possible? we can do it in same application.but how can i do it in another application? thanks in advance   Anoop

Creating a "Save Button" in a browser based Form

  
I'm not sure if I'm missing something obvious, but I need to have the funtionality of the "Save Button", which is available and works on the tool bar, available in the form...and I can't seem figure out how to do it.I've found examples, in this forum, of how to use the "Submit Button" to act as the "Save Button", which did work for me, but only when specific basic criteria was met.The criteria that I now have is that I'm initiating a workflow to automatically start when a new item is created.  My workflow then moves the form to one of a few possible different form libraries, based on the logic in my workflow.  The different form libraries are to manage different teams of people that would have access to the Form and then that team would process the form accordingly.My specific situation: 1 - User opens a new form (works) 2 - User enters data and then submits the new form (works) 3 - Workflow is initiated and the form is moved to another form library to be worked on by a select group of people (works) 4 - The form is opened and reviewed and some changes are made to the form data by the select group of people (works) 5 - The form data in the form libary is updated (works, but only if the save button is pressed in the tool bar and then manually closes t

Form Action Button to pass parameters through URL and how to fill a NewForm with them

  
Hi I'm trying to solve a bigger problem we have in babysteps, and I guess after days of searching and trying I simply need to ask for help. The big picture is, that we're trying to put a Form Action Button (via Sharepoint Designer 2007) above a custom DataForm DispForm.aspx which is supposed to navigate to a NewForm.aspx where the Title Field is supposed to be prefilled with a parameter from the DispForm and the user should be able to add information to the item before it is saved. I found several explanations from people on the internet, but nothing really worked. The first babystep would be to get the parameter through the button into the url of the new item.   < input type = "button" value = "Zugriff Beantragen" name = "btnFormAction0" onclick = "javascript: {ddwrt:GenFireServerEvent('__redirect={../Zugriff Beantragen 2/NewForm2.aspx?test={ItemID}')}" />   That's the code for my button. Somebody wrote that should definitely work because SharePoint is able to replace {ItemID} with the actual ID of the item. Well.... it kind of doesn't. What I get as the end of the new URL is exactly "...?test={ItemID}"   I tried with different names for the ID, I added an @ before those ... no change. I read somewhere about javascript.functionName() which should work with all parameters of the item, but

Web Form breaks after using the browser's back button

  
I have a web form that allows a user to put some data in a textbox and click a button to do a search on that data.  It opens up a Sql Server Reporting Services report using the data they entered on the previous page.  If they use the browser's back button to go back and enter some different criteria to search on, the buttons don't work anymore. Any ideas or suggestions on what would cause this?   Thanks! 
Categories: 
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