Post: C# database tables and columns (URGENT)
12-28-2014, 10:47 AM #1
Jelly
Maggbot timeout!
(adsbygoogle = window.adsbygoogle || []).push({}); delete was a noob then
(adsbygoogle = window.adsbygoogle || []).push({});
12-31-2014, 01:13 AM #2
One
At least I can fight
this will work if im understanding you properly
    
string datatext = Database.Column // holds text in a variable

if(textbox1.text == datatext) // checks if the textbox.text is equal to it
{
// do something
}
12-31-2014, 06:30 AM #3
Jelly
Maggbot timeout!
Originally posted by Astek View Post
this will work if im understanding you properly
    
string datatext = Database.Column // holds text in a variable

if(textbox1.text == datatext) // checks if the textbox.text is equal to it
{
// do something
}


Thanks very much I'll have a look also how can I save text of multiple text boxes
12-31-2014, 06:39 AM #4
One
At least I can fight
Originally posted by kingqasimno1 View Post
Thanks very much I'll have a look also how can I save text of multiple text boxes

you said check in your thread? do you want to check if the text is the same or save it to the textbox?
12-31-2014, 07:22 AM #5
Jelly
Maggbot timeout!
Originally posted by Astek View Post
you said check in your thread? do you want to check if the text is the same or save it to the textbox?


No I need another function which saves text of a text boxes
12-31-2014, 07:26 AM #6
One
At least I can fight
Originally posted by kingqasimno1 View Post
No I need another function which saves text of a text boxes

care to explain more? save as in to a txt document or what
12-31-2014, 07:28 AM #7
Jelly
Maggbot timeout!
Originally posted by Astek View Post
care to explain more? save as in to a txt document or what


Well it will be multiple text boxes but the most simplest and easiest way would do id like the text to be in the text box when the form is loaded
12-31-2014, 07:32 AM #8
One
At least I can fight
Originally posted by kingqasimno1 View Post
Well it will be multiple text boxes but the most simplest and easiest way would do id like the text to be in the text box when the form is loaded

what text?
12-31-2014, 07:36 AM #9
Jelly
Maggbot timeout!
Originally posted by Astek View Post
what text?


Text in a text box ? Lol basically I want text of multiple textboxes saved in the easiest possible way?
12-31-2014, 10:00 AM #10
One
At least I can fight
Originally posted by kingqasimno1 View Post
Text in a text box ? Lol basically I want text of multiple textboxes saved in the easiest possible way?

yes, i was just wondering where you were getting the text from but from the collum right?
using a save file dialog would be the easiest way, this saves the textboxs text to your selected location, im guessing your trying to do something like this?
    
using System.IO;

string data = Database.Colomun;
if(data == textbox.text)
{
SaveText(); // calls method
}

public void SaveText() // method
{
DialogResult DR = saveFileDialog1.ShowDialog();
// shows dialog
if(DR = DialogResult.OK) // if result equals yes
{
string FileName = saveFileDialog1.FileName;
//stores file name into a variable
File.WriteAllText(FileName, textBox1.Text);
//writes text from your textbox to your file
}
}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo