|
I don't think the control array is in .NET any more (and good riddance!!).
If you use WinApp, you can dynamically create the controls and assign the names to the controls (textBox001, textBox002 etc). Then you can put the controls in a collection such as hashtable for easy access. Though I am not sure how is it to be done in web app.
I would suggest you use dynamic array sparringly, only if you need to, but because of lazy to type out the names. The last vb program that I need to do some enhancement, I was cursing and swearing when I trying to debug the forms. Can you imagine that the whole application consist only of control array of buttons, textboxes, checkboxes?!!
|
|
|
|
|
Hi
You can get TextBoxArray controller using “Microsoft.VisualBasic.Compatibility.VB6” Namespace.
I did not try. Please try with this.
Good luck
Chandana
|
|
|
|
|
Hello,
I used a number of Textboxes in Web Application using C#, now i want to access all these but i don't want to write name of each textbox i just want to use an ARRAY to assign values (Or Access these textboxes), I saw this somewhere in Visual Basic 6.0 but i don't know how can i do that in Visual Studio 2003 please tell me some solution for this to avoid write the names of all these ???????????????
Waiting to hear something soon from anyone
Regards,
AbuBakar
|
|
|
|
|
Hello,
I used a number of Textboxes in Web Application using C#, now i want to access all these but i don't want to write name of each textbox i just want to use an ARRAY to assign values (Or Access these textboxes), I saw somewhere in Visual Basic 6.0 but i don't know how can i do that in Visual Studio 2003 please tell me some solution for this to avoid write the names of all these ???????????????
Waiting to hear something soon from anyone
Regards,
AbuBakar
|
|
|
|
|
I would like to catch the sql error that returns from the stored procedure.
The SP is written in 2005 with try/catch statement.
What should be placed in the catch statement of the SP and how can the .net code i.e vb.net or C# get this error to show to the user?
Thanks
|
|
|
|
|
try
{
//ur code
}
catch(SqlException ee)
{
Response.Write("alert('" + ee.Message+ "')");
}
|
|
|
|
|
It depends on the client application (ASP.NET, Console, or WinForm).
In all cases, I would build a string that explains the exception, including any property particular to the SqlException class.
When the string is ready, there are many ways to display it to the user:
ASP.NET: You may use a label.
WinForm: MessageBox
Console: Console.Error.WriteLine
Some piece of advice:
- When displaying error information, give the user the tools to fix the problem, by telling as much as possible to the user. In the case of the SqlException class, there are the Procedure, LineNumber, Number, etc. properties. There is nothing more frustrating than the "An error occured" message.
- In the Console version, notice the use of the Error StreamWriter property of the class. I do this, because the Console.WriteLine call outputs to the regular output stream.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hello!
Remember, in setup of account record Outlook there is an opportunity to open postbox of other user.
How to retrieve contacts list other Outlook user postbox?
I shall be grateful for any information on the given question.
Thanks,
Alexander
|
|
|
|
|
How can i draw a line or rectange in a ASP.net Web form by getting the points from the user or by using mouse down event.
Rohit
|
|
|
|
|
The mouse events are obviously client side, so you would do it using Javascript or something. As it is client side, there is nothing specific .NET related to this. And no, I can't point you to any information about how it is done - I have seen someone doing similar things, but I avoid Javascript whenever posibile so I have no intention finding out how it is done.
Alternatively embed a WinForm control on the page. This is probably easier to program but it will only work if the client has the .NET Framework installed.
|
|
|
|
|
thanks a lot for ur reply. Can u just tell me any of the sites where i can get a smple javascript code for that
Rohit
|
|
|
|
|
As I said, I do not touch Javascript so I have no idea where to find samples. Life is too short for weakly types scripting languages.
|
|
|
|
|
|
rTB2.Clear();
int i = 0;
string s = rTB1.Text;
string substr = "";
switch(rTB1.Text)
{
case '"':
{
while (i < s.Length && s[i]!='"' && s[i]!='\n')
{
substr += s[i];
i++;
}
rTB2.Text += "String - " + substr + "\n";
substr = "";
}break;
}
|
|
|
|
|
This is my code. If you see s = rTB1.Text. So you simply rewrite my code. If you can, please help
|
|
|
|
|
a very simple method is to get the first index of " (opening quotes)
and then get the next index of the " (closing quotes)
and the get the substring within those indices
Regards,
Pramod
|
|
|
|
|
I guess You are right, but I mess up something so i could not use that way of solving the problem. If you could give me an example, will be appreciated.
Regards,
Mitko
-- modified at 5:29 Tuesday 7th March, 2006
|
|
|
|
|
try this one
if(richTextBox1.Text != "")
{
string str1 = richTextBox1.Text;
int i= str1.IndexOf('\"');
int j = str1.IndexOf('\"',i+1);
string str2 = str1.Substring(i+1,j-i-1);
richTextBox2.Text = str2;
}
Regards,
Pramod
|
|
|
|
|
You could use a regular expression to parse the string.
Using a pattern like "([A-Za-z]+|\"[A-Za-z ]+?\")" would capture all "identificators" and quoted phrases in the string.
---
b { font-weight: normal; }
|
|
|
|
|
Can any one guide me about exporting entire database (and not a single table) in SQL server in to Micrisoft Excel 97-2000 and vise versa ? Similar to DTS Import/Export Wizard in SQL Server Enterprise Manager.
Well, I want to do this in C#
warn regards
Sachin
-- modified at 4:16 Tuesday 7th March, 2006
|
|
|
|
|
|
Hi all,
Is there a 2D array list? Basically I need a 2D dynamic array. Thanks in Advance. Cheers.
|
|
|
|
|
ya u can surely create a 2D arraylist
e.g.
Arraylist arrlst = new ArrayList[count];
for(..)
{
arrlst[i] = new Arraylist();
arrlst[i].Add();
}
Regards,
Pramod
|
|
|
|
|
public struct Int32 : IComparable, IFormattable, IConvertible, IComparable<int>, IEquatable<int>
how do you make a structure like Int32 , for exemple
NewInt i = 15;
|
|
|
|
|