Re: CLASS PROBLEM
- From: "Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin AT dot.state.fl.us>
- Date: Tue, 5 Sep 2006 09:08:27 -0400
Hi,
You can call & store the value in Form2's constructor:
public partial class Form2 : Form
{
private WebSeTcrb.Tecrube S;
string s;
public Form2()
{
InitializeComponent();
S = new WebSeTcrb.Tecrube();
s = S.MerhabaDunya();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = s; }
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Savas Ates" <in da club> wrote in message
news:e2KjOuN0GHA.4920@xxxxxxxxxxxxxxxxxxxxxxx
<%@ WebService Language="C#" Class="Tecrube" %>
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://www.aaaa.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Tecrube : System.Web.Services.WebService {
public DateTime Tarih;
public Tecrube()
{
Tarih = DateTime.Now;
}
[WebMethod]
public string MerhabaDunya()
{
return Tarih.ToString();
}
}
Using System;
using System.Windows.Forms;
namespace WS_Tecrube_01
{
public partial class Form2 : Form
{
private WebSeTcrb.Tecrube S;
public Form2()
{
InitializeComponent();
S = new WebSeTcrb.Tecrube();
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = S.MerhabaDunya();
}
}
}
When i click the Button1 it returns the time when i clicked the button. I
suppose to see the time when the form initiliaze.
What can be the problem ?
.
- References:
- CLASS PROBLEM
- From: Savas Ates
- CLASS PROBLEM
- Prev by Date: Re: validation of an xml file against multiple defined schema
- Next by Date: Exporting HTML pages
- Previous by thread: Re: CLASS PROBLEM
- Next by thread: how to create language resource file
- Index(es):