Pass a reference to the label in form1 to class1 when you create it, save it there and the update it from there.
Make sure the label is declared public in form1
Most programmers using C# probably come from the C/C++ camp where type checking was not left to the compiler but the programmer; obviously VB does take extra steps to do it for you and thus might take extra code.
You also shouldn't use the Parse but the convert.
num = Convert.ToInt32(textBox1.Text);
Might as well get used to all the convert functions,
and there are lots of them. Advantage is that if you use VS then intellisense will show all the options to you.
This is an example from the MSDN Library:
<%@ Page Language="VB" AutoEventWireup="True" %>
<html>
<script runat="server" >
Sub Page_Load(sender As Object, e As EventArgs)
' Create the HtmlTable control.
Dim table As HtmlTable = New HtmlTable()...
I am not quite sure I understand your question exactly, but you can create any control dynamically with progranatically a new command and define the loction and data binding at that time.
hook the text box for your comments into an event processor:
add to the InitializeComponent() section an entry for your textbox name like:
textBox.TextChanged+= new System.EventHandler(this.textBox_Changed);
then put into the event process handler (if you have Vs hit two tabs to create it)...
Since you do the listbox update on the client side with jscript the server doesn't know about it.
Have you considered using a hidden field on the client filled by the jscript to hold this count so the server can read it?
Replace myApp.exe with the name of your application...
FileInfo fileInfo = new FileInfo("myApp.exe");
if (fileInfo.Exists)
{
sCurDir = fileInfo.DirectoryName;
strFile.Insert(0,sCurDir + "\\" + "myApp.exe");
FileVersionInfo myFileVersionInfo =...
If the XML data resides in a file the simplest thing is to load it into a dataset: xmlName = file name)
public void readXML(string xmlName)
{
dataSet1.Clear();
dataSet1.ReadXml(xmlName);
dataSet1.AcceptChanges();
}
then you can access the data by rows and columns.
If you want to work on it by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.