Passing Data Between Winforms And Webforms?

Mar 6, 2009

i'm planning on creating an application that uses both winforms and webforms and i have a few concerns before i proceed.1. is it possible to pass data between winforms and webforms?2. how about passing objects like connections, datatables, dataadapters etc. between webforms and winforms?3. i want a centralized authentication for all forms and webpages... meaning if i'm authenticated in a winform, i should also be authenticated when i launch a webform thru the winform and vice versa.

View 9 Replies


ADVERTISEMENT

Passing Data From WinForms Application To MVC3

Dec 14, 2011

I am working on an application that has a Winforms and MVC3 Web component. We need to be able upload large files from the desktop to the web. I have tried the various VB 2010 WebClient and FTP FileUpload alternatives but continue to run into permission issues, even though the User-ID and password I supply are the same as those used by an FTP application that successfully copies files to the same MVC3 site. In my efforts to find alternative solutions, I have looked into using WCF which also seems complicated and problematic for this particular application.

The closest I have come to a solution utilizes HttpWebRequest on the Winforms application. The following VB 2010 and C# code (MVC3) successfully passes the Filename and File data to MVC3 (the InputStream contains the references and UrlEncode data, but the class containing the fields for this data are null. (I have also passed just the file data without the filename, and the uploaded file is successfully created from the InputStream - but the method variable is still null). Although I could pick apart the InputStream, I would prefer a more elegant alternative.

VB 2010 Winforms method:
Public Shared Sub FileUpload(ByVal Filepath As String)
Try
Dim Host = System.Configuration.ConfigurationManager.AppSettings("Host")
Dim url As String = Path.Combine(Host, "UI/FileUpload")
Dim request As HttpWebRequest = HttpWebRequest.Create(url)
request.Method = "POST"
[Code] .....

View 2 Replies

Winforms - Passing Values Out Of Forms?

Sep 8, 2011

I have a very simple windows forms setup. Form1 has a progress bar and a button on it, when clicked the button opens Form2 which also has a button on it that launches Form3. On Form3 is a button which I want to use to raise an event back to Form1.To achieve this can I add an event handler on form1 that will listen for an event of the type raised in form3? Or do I have to pass references to form1 to form2 and then from form2 to form3?

View 1 Replies

.net - WinForms - Passing Same List As DataSource For Two Different Listboxes?

Dec 30, 2009

Check out the simple code below :

[code]...

What happens is that when the Item2 is selected in the first listbox, the second listbox automatically changes its selected item to the Item2. This happens just the same with the other listbox.

View 3 Replies

C# - Routing In WebForms For A CMS?

Dec 8, 2011

I know that you can create routes in asp.net web forms, but how do I go about creating one that handles all my pages like [URL]? I do have a file called page.aspx that will process all the requests for the CMS. I think it's a root handler I need.

View 2 Replies

MVC In C# Coexisting With Webforms In VB?

Aug 11, 2010

I have inherited a really awful webforms application that is all kinds of bad--an untestable hairy mess of datasets and Page_Load events. Object oriented? N-tier? Unit tests? source control? All academic niceties to the team that built this mess.

It started life as an asp classic app, got mostly ported to VB.NET. Management denied my request to "nuke the entire site from orbit" and start over.

[Insert discourse on how ASP.NET MVC is absolutely, positively the only sane way to to .net websites anymore]

I know we might be able to interoperate between the legacy webforms and mvc. The question is, can we leave the legacy code in VB and build the new stuff in C#? I want to force the conversion to C# so the team doesn't fall back into bad habits.

Is there an MVC 2 Areas strategy that we could use here?

View 2 Replies

Ajax Page With ASP WebForms

Sep 14, 2011

I'm amateur with asp and .net, but i need create a page to generate xml/json output response similar to java servlet.what is the best way to do ajax response with asp forms? Asp page form with [code]

View 1 Replies

Convert A .NET 4.0 Webforms Solutions To C# 4.0?

Jun 18, 2011

I have a VB.NET 4.0 based solution (just one project) in Web Forms and needs quick conversion of the whole solution to C#.

View 1 Replies

Got Exception :Sys.WebForms.PageRequestManagerServerErrorException

Feb 22, 2012

Why I got this error Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.this error appears when the event for Save command is started

[Code]...

View 1 Replies

.net - Finding WinForms Data Grid And Data Editor Controls?

May 15, 2011

Are there any good free alternatives to DevExpress data grids (WinForms)?I am looking for WinForms Data Grid and Data Editor Controls.

View 1 Replies

Filling Out Webforms/textboxes Vb2010/08?

Jul 27, 2011

my problem is that i need to fill out a webform or a textbox, i tried using getelementbyid but then noticed the webform had no id only a name is there anyway of getting it to use a name instead of a id? (to be more specific instead of id= on a webpage is there any function that could use the name=?)

View 4 Replies

WebForms - OnClick Event For Textbox

Mar 10, 2011

I am trying to write an onclick event for textbox but VB.net does not seem to support textbox1.click(). I want to open a new form every time someone clicks on the textbox. Opening a new form is no problem, but I cant detect the click. Is there any event for textbox that detects click event? I saw something like TextboxBase that has Click but I am able to use it well.

This is how my class looks :
Partial Public Class TextBoxClick
Inherits System.Web.UI.Page
End Class

It has some basic load and init events. I am trying to write a Sub like this :
Private Sub incident_clicked(ByVal sender As Object, ByVal e As System.EventArgs) Handles Incident.OnClick
Incident.Click does not work either.
I am guessing I need to import some class to access the Click event but I am not sure which.

View 4 Replies

WebForms :: Binding A List Of Keyvaluepair To ListView?

Sep 20, 2011

I am trying to bind a New List(Of KeyValuePair(Of String, Integer)) to a listView
Currently, I have a code off:

Dim TestList As List(Of KeyValuePair(Of String, Integer))
For Each key in GetTPDesc (Which is a list of strings)
TestList.Add(New KeyValuePair(Of String, Integer)(GetTPDesc.ToString, 0))

[code].....

View 2 Replies

Search A Webforms Textbox For Specific Word (VB 2005)

Sep 30, 2011

I have been searching all morning for a sample showing a simple "find" example for an ASP.NET Webform, where a "find" button is used to find a string in a Textbox, and then Highlight it, like Word does. The following VB6 code worked perfectly, but I couldn't find .Selstart or .SelLength properties in the Text property of the ASP.NET textbox.

'find the first instance
Private Sub Command14_Click()
Command36.Visible = True

[Code]...

Is there a way to Select the Length and Start of the string in ASP.NET. The Winforms code is very similar to the VB6 code, so maybe I'm just missing something simple.

View 3 Replies

Winforms - Binding Data To A Data Repeater?

Nov 15, 2009

I'm looking for a line or two of code that will bind a DataSet.Datatable column to a textbox on a Datarepeater?

View 2 Replies

Server-side Html Coding - WebForms | Dream.In.Code?

Mar 17, 2009

What to change color of label in Web Form by letting each user click a button. Cannot figure out how to put code in aspx.vb without geting a souce code error. Is there an option in Visual Studio 2003 that allow you to key html in aspx.vb.

View 7 Replies

Passing Data From Database And Increment Data?

Mar 15, 2012

I have 2 question to ask about vb.net. Now i'm using Visual Studio 2005 with connection MySql...

1. how if I want to passing the data from database to the textbox by SEARCH button. I Have 1 SEARCH button and 3 textbox [txtname],[txtage],[txtaddress] and to pass it also on datagrid...

2. I have a id_Student starting with S001 in database...and I want the id is increment when new data is added. The id_Student is display using lblID_stud

View 6 Replies

Winforms - List Data In Ms Sql?

Mar 10, 2010

Below is the code that I'm using in ms access to list the data according to what is selected in combobox and what is input in textbox.

My problem is there no commandbuilder in ms sql like in ms access, because it fails when I try:

dim mscombuilder as new sqlcommandbuilder

Here is the code:

''#list school
If ComboBox1.SelectedItem = "School" Then
Dim connectionString As String = "Data Source=SENBONZAKURASQLEXPRESS;Initial Catalog=testing;User ID=SenbonZakuraRew; Trusted_Connection=True;"

[Code].....

-There is no such thing as commandbuilder in the options that will appear. Do you know of any alternative of commandbuilder in ms sql?

View 1 Replies

Passing Data Into Vb?

Oct 17, 2005

I`m trying to code something to populate an outlook message with data from another application but i'm having problems passing the data into something which could be executed.I'm basically using the script Sub SendMailOutlook(ByVal Recipient , ByVal Subject, ByVal TextBody , ByVal From )

Dim olApp As Outlook.Application
olApp = CreateObject("Outlook.Application")
Dim olMail As Outlook.MailItem

[code].....

View 3 Replies

Getting Data From WinForms ListView Control?

Mar 24, 2010

I need to retrieve my data from a ListView control set up in Details mode with 5 columns.

I tried using this code: MessageBox.Show(ManageList.SelectedItems(0).Text)

And it works, but only for the first selected item (item 0). If I try this:

MessageBox.Show(ManageList.SelectedItems(2).Text)

I get this error: InvalidArgument=Value of '2' is not valid for 'index'. Parameter name: index

I have no clue how I can fix this, any help?

Edit: Sorry, should have said, I'm using Windows.Forms :)

View 1 Replies

Winforms - Drag Data From DG And Other Controls To Another DG?

Feb 15, 2012

I have form in VB.Net 2010:

I want to click-drag multi rows in dgRegister and Date, Course ID to drop in dgCourseStudent with column Date, Register ID, Register Name and Course ID.

How to code this in vb.net language?

View 1 Replies

2008 DLL Passing Data Among Different Exe's?

Oct 15, 2010

I have written a class library that creates a dll to pass data back and forth within the same compiled instance exe. Is it possble to configure this Class Library in order to pass the data produced in the first instance of an .exe to other instances exe programs written in VB.NET?

My first thought was to add a Module. Older versions used Declare Files. Is there something in the compiler that I should set where the variables point to a specific memory address, or something..., that makes the variable available to other VB programs running in a seperate instance?

[Code]...

View 2 Replies

No Data When Passing The Parameters In Pdf?

Oct 14, 2009

to solve my problem regarding dataset, crystal reports and exporting to pdf file? There are datas when i preview the crystal reports but when i export it to pdf viewer there's no data displayed. Here's my

DataOpen()
cmd.CommandText = "Select * From AllDTR Where BIOID = '" & myuser & "' AND Date > '08/31/2009' ORDER by Date"

[code].....

View 3 Replies

Passing Data Between Forms

May 10, 2010

I have 2 forms. Using Visual Basic.On Form 1 there is a populated combo box. This was done so by running a query through it and populating it with PUZ_ID values from a data set.On form two there is a tool strip and below is a search query.I need to be able to select the value i want in the combo box on form 1, and launch a button that opens form 2, which has loaded the data that i binded onto the form.Anyone have any ideas/code or need me to clear this up a bit more?So i need to run something through a query, or make something public or what?

View 2 Replies

Passing Data Between Forms?

May 10, 2010

I have 2 forms. Using Visual Studio.

On Form 1 there is a populated combo box. This was done so by running a query through it and populating it with PUZ_ID values from a data set.

On form two there is a tool strip and below is a search query.

I need to be able to select the value i want in the combo box on form 1, and launch a button that opens form 2, which has loaded the data that i binded onto the form.

So i need to run something through a query, or make something public or what?

View 2 Replies

Passing Data Between Functions?

Jun 8, 2012

I would like to have custom methods to pass data between function, or to keep it in memory throughout the program.

Example:

Private function info()
Addr1 = addr1.text
Addr2 = addr2.text
City = city.text

[code]....

Could I run this function towards the beginning of the program and use it throughout until the form is disposed? I can't seem to get the information to stick once I get out of the function, I will need to use the same information multiple times throughout the application so I figured if I could make a function to keep the info rather than declaring the 5 lines in every option but anytime I call the method, it fills it correctly then when I get back to the main function the info goes back to 'nothing'. is it possible to pass data around between functions like you could in Java?

View 5 Replies

Passing Data Between VB NET Com Class And VB 6

May 12, 2010

How do I pass a structure containing strings from VB.net to VB6. I can get an integer to work but not a string.

View 3 Replies

Passing Data From Access To VB?

Nov 2, 2009

i'm using VB Net 2008 and MS Access as my database.Its like this, form1 display the details for the TV Show and a button1 that loads form2 which contains the episode for that TV Show.I have 2 tables, both have the same field Movie_ID. able1 contains the details for all the TV Show, Movie_ID set as Primary key and table2 which contain the all the episode but categorize by Movie_ID.

View 1 Replies

Passing Data To Another Form

Apr 28, 2009

i got 2 forms.there are 2 buttons in the 1st form and what i wan is,when a user click button 1,then will show form 2 will related data,click button 2 will show related data which is different with form 1.so far wat i get is,i oni manage to make when a user click button 1,then show form2 n in d form 2 there is another button to click n get d data...which mean i nid 2 create more forms...erm...u can say that i would like to make the form 2 to become a template...and send data into it.[code]i just wana make like i click button1 in form1,it will pop out form2 wit related data.

View 7 Replies

Passing Data To Report?

Jun 16, 2011

I work as a console technician for an audio company in the north eastern United States. My job is to prep and manage all of our audio console before they go out on tour. form to the report?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved