|
shekkk wrote:
can anyone tel me how to access one variable retrieve from a database in one web form from another web form.....
Load it from the database again, or cache it per user.
shekkk wrote:
and also how to allow multiple clients to have access to the web application....
Put it on a public web server.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i want to know how to allow text in php and word documents to open from inside a wb apllication form...
|
|
|
|
|
You want to run PHP within an ASP.NET page ? I doubt it. Word docs will open as a page automatically. If you mean within part of a page, perhaps a frame will do it ?
Please start putting something meaningful in the subject line, if people know what you're asking about, they're more likely to answer.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello, Ive got the following problem:
I don't know how to create a NEW member everytime i click the button. I've got:
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click<br />
<br />
Dim Mem1 As New Member<br />
<br />
Mem1.Title = Me.cmbTitle.Text<br />
Mem1.Forename = Me.tbForename.Text<br />
Mem1.Surname = Me.tbSurname.Text<br />
Mem1.Address = Me.tbAddress.Text<br />
Mem1.Town = Me.tbTown.Text<br />
Mem1.Postcode = Me.tbPostcode.Text<br />
Mem1.DateOfBirth = Me.tbDob.Text<br />
Mem1.Telephone = Me.tbNumber.Text<br />
Mem1.CustomerID = Me.tbID.Text<br />
<br />
End Sub
But it doesn't create anew member each time?????
Any help will be much appreciated.
|
|
|
|
|
Of course not. All you did was create a Member object, called it Mem1, set a bunch of properties on it, then forgot about when the Sub finished.
What are you trying to save this object in? You don't have any code in here to save the object anywhere.
You need to store the object somewhere, like in a collection, that was created outside this function you posted. Currently, the Member object you created only exists inside this function.
For instance, if you wanted to create a new TextBox control on a form you could:
Private Sub btnNewTextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewTextBox.Click
Dim myNewTextBox As New TextBox
myNewTextBox.Text = "Some text..."
End Sub
Just like you did with your Member object. But, you'll never see this TextBox to be able to do anything with it because at the end of the function, the new object is detroyed because nothing outside this function can get to it. What you need to do is add it to a collection that was created outside this function. In my example, its the form's Controls collection:
Private Sub btnNewTextBox_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewTextBox.Click
Dim myNewTextBox As New TextBox
myNewTextBox.Text = "Some text..."
Me.Controls.Add(myNewTextBox)
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how would i do this if i am to create more members from the same control??? i'm new to this.
|
|
|
|
|
Same thing. Create the new member and add it to a collection that's been created outside the function your creating the new member in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
|
Details man! Details! What on earth are you talking about, "other end"? Of what, a 10 foot pole?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
;PR u joking it means from other form
|
|
|
|
|
|
Keep going! That's helpful, but only a little bit.
I'll make a bunch of assumptions here and just drop a little tidbit for you. A form can NEVER close the form that created it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Your lack of detail is the joke here. So far, what you've done is walk up to a street corner and ask a total stranger, "How do I close my door from here?". Of course, he/she is going to ask you "What door?", "What kind of door?", "A car door, door on your house, what?", "Where is the door you want to close?", ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Your second form needs a reference to the first form. When you have a reference to the Form object, you can call any of the Form's methods, such as Close.
I usually pass a Form reference to another Form object by exposing a property such as ParentForm, or sometimes I pass it via the Forms constructor. A lot depends on circumstances and how I want to use the second Form object.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
I want to start a new application in using vb.net 2.0 and I would like to be able to deploy this application with it's own integrated database. Could someone point me in a direction on how to do this.
Thanks
H.Wolfe
|
|
|
|
|
What do you mean by "integrated"? You can use any database for this, be it SQL Express, MSDE, Access, XML files...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I know what you are saying, i am doing the same thing. The best thing to use is MSDE. it is microsofts smaller free version of SQL. It has a 2GB limit but that is ideal for database apps unless it is something really big.
|
|
|
|
|
Hi to all! I am doing a project of AutoDialer. I have done coding in VB6. Its is ringing the phone. But what I want is, When the reciever picks up the phone, an audio message must be played. The audio message must be prerecorded. Can any body help please, I am using AT comands for ringing the phone.
|
|
|
|
|
This is only possible if you have a Telephony-capable modem. You can't use a normal modem to do this.
Beyond that, you'll have to search for examples of VB6 TAPI applications[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I run a SQL stored procedure from within Visual Basic?
Thank you.
|
|
|
|
|
|
the very simple method is use the procedure as you use the select query
cmd.CommandType = "ProcedureName p1,p2,p3"
' Either
cmd.executenonquery
'or if you want to recieve some thing
da.SelectCommand = cmd
da.Fill(Dt)
where cmd= Command
da= dataadapter
dt=datatable
p1,p2,p3 are the parameters which you need to send
hope this will help
|
|
|
|
|
|
hi i am a student working on my final year project i hav dissabled print option from the file menu using a com addin but when i press ctrl + P the print option comes up again. some one help me
and i want only my addin to work in word i want to dissable all other addins can some one guide me
chandrashekar
|
|
|
|