|
HI all
Please can any one tell me the right syntax for this
I want use 2 variables in 1 FOR loop
dim t , k
For t = 1 To 10 and k = 11 to 20
Next
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
I don't know about VB.NET but it is possible in C#
for(int t = 1, k = 11; t <= 10; t++, k++)
{
}
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
-- modified at 9:45 Saturday 29th April, 2006
|
|
|
|
|
Just initiate the second variable before the loop, and increase it inside the loop.
---
b { font-weight: normal; }
|
|
|
|
|
Hey - That's cheating!
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
What's wrong with
For t = 1 To 10
For k = 11 To 20
Next
Next
Or am I missing something obvious?
cheers
P
-- modified at 11:11 Saturday 29th April, 2006
|
|
|
|
|
That is two nested loops. He wanted one loop updating two counters.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Some people are SO fussy
anyway, the question was somewhat ambiguous in that respect - as usual, the quickest way to get the right answer is to ask the rght question.... be that as it may, I guess Guffa's way it is then (in VB) though why that constitutes "cheating" I don't know - some people are SO fussy
cheers
P
|
|
|
|
|
Half the time when replying to questions you have to actually write the question for them also.
A lot of people doesn't know how to ask a question, or even what to ask for. You just have to try to help them anyway. At their second or third posting you usually have dragged enough information from them to be able to help them.
---
b { font-weight: normal; }
|
|
|
|
|
How about:
dim t <br />
For t = 1 To 10 <br />
dim k = t + 10<br />
<br />
Next
Roy.
|
|
|
|
|
Thx i got it
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi all,
I have an Activex player.i need to download its dll in aspx page.For that I am using the following <object> tag.
<object id="AxPlayer"
classid="clsid:ARB6AA3F-5D76-41E4-B6D9-6AD25326A988"
codebase="C:/Inetpub/wwwroot/AxPlayer/AxPlayer.dll#Version=1,0,0,3"
hspace="0
vspace=0" border="15">
Its working fine.But my problem is ,
While downloading the Dll,i need to show a flash movie.
(A movie, showing that the dll is downloading...)
I have included another <object> tag to get the flash.But both the Activex player and the flash is coming simultaneously..
I need to get the flash, only when the Activex player is downloading.
How can i do that.??
Please help me.its urgent
Thanks in advance.
puja
|
|
|
|
|
I would try putting both in an absolutely positioned DIV control's on the page, and having the loading flash object's DIV set to visible onLoad, and then after the other one is loaded, swapping the visibility.
You could do this with PlaceHolder controls as well... That would be my thought on it.
Good luck.
Practice sesquipedalianism!
|
|
|
|
|
dear sir,
I am having two web cam on two system i just want to capture, the live video, from one system to another(Using ASP.net,VB.Net),i hope you understand my problem,please help me,
Is It possible in php
thanks:
prabhakar dwivedi
|
|
|
|
|
Hi all,
I using Repeater control to show "Email id" and "Comments".Everything working fine,but if comment is large in size page get extended horizontally.
How i can break comment in multiple lines.
Regards,
Nagraj
|
|
|
|
|
You msut convert new line charachters (Enverioment.NewLine) into <br />'s
--------------------------------------------------------
<a href="http://www.hancic.info">My portfolio & development blog</a>
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I am getting Invalid File Name error when trying to export the crystal report to pdf format which I have deployed at the server. other aspx files are accessed correctly except the crystal report.
|
|
|
|
|
1.What is the difference between bound column and template column?
2. How do I do sorting on columns dynamically in a grid?for example if i have four columns in a grid and at runtime the user should have the option of soritng records based on any column.Can I use dataviews and do it?
Uma
|
|
|
|
|
Hi Uma,
I just try to help you.Let's see one by one
1)Difference between bound coloumn and template coloumn is -> you can use teplate column to insert controls(i.e checkbox,dropdownlist) in datagrid column.
2)To sort Datagrid at runtime just use order by clause in your query and fill datagrid.To make it at runtime just fill grid by order by clause at everytime when user click on sorting field(i.e.rollno)
I think it will help you.
Bye........
|
|
|
|
|
1:
A template column allows you to create a custom layout for a column based on any mixture of controls and static text and we use the BoundColumn column type in a DataGrid control to just display the contents of a field in the data source.
2:
Step 1.set AllowSorting="True" in <asp:datagrid> tag in .aspx
Step 2.set SortExpression="Column name" in BoundColumn\Templatecolumn tags in .aspx
Praveen
|
|
|
|
|
1. Data bound column will show you data from database directly but in template column you can add another controls in datagrid and can get the benefites to make ur datagrid more functional...
ye you will have to use dataviews for this and also you will have to be written an event for sorting...
Dinesh Sharma
Team Leader (Software Development)
|
|
|
|
|
Thank u.I used dataviews and also wrote an event to handle it.
Uma
Kindly send me feedback
Thanking you,
Raghuvarma.
|
|
|
|
|
Hi friends
What is difference bet
1) if (null == variableName ) And
2) if (variableName == null) is both are same ?????????
|
|
|
|
|
yogsworld wrote: is both are same ?????????
Yes, the are both the same.
The reason you might see some people using the first varient is that in some languages (e.g. C, C++), if you made a mistake and typed
if (variableName = null) by accident the compiler would accept it. (Note the single equal of assignment). By putting the constant on the left hand side of the operator the compiler would reject the assignment and the developer would realise they missed the extra equals sign.
In .NET, the langage specififcation states that the result of an if statement must be a boolean so the compiler would reject an assignment in an if statement. It will give the error message
Cannot implicitly convert type 'object' to 'bool'. If someVariable was a boolean the error message you'd get is
Cannot convert null to 'bool' because it is a value type However, there is one scenario where the compiler will accept an assignment in an if statement. That is, if the assignment evalulates to a boolean. e.g.
bool someVariable;
if (someVariable = false) {} The compiler will compile this, but issue a warning instead
Assignment in conditional expression is always constant; did you mean to use == instead of = ?
Does this help?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
hi
i didn't get your ans ... I just simply ask
difference bet if ( someVarial == null) and if (null == somevariable)
i.e position of nulll should be first or not I know both expression are evaluating same result.but if u see some code they comaore like
if (null == someVarible) i.e position of null is first why ??????
Here someVarible is an refrence type not a value type ......
YOgesh M
|
|
|
|
|
yogsworld wrote: position of null is first why ??????
I explained why. It is a historical thing. Developers who programmed in languages such as C or C++ put null first as a way of protecting themselves by having the compiler flag an error to them. The error being the accidental missing equals sign.
= means assignment
== means a comparison
These two concepts produce radically different results, yet are very very easy to accidentally mix up. Someone typing fast may miss one of the equals signs.
In C# the compiler demands that the result of the conditional expression in an if statement evaluates to a Boolean value. I demonstrated the various error messages that the C# compiler would generate that a C or C++ compiler would not likely generate.
I should clarify: Putting the null first is not completely the same as putting it second IF there is an error in the code. If the code is written correctly with the double-equals (comparison) operator then the code is the same.
Does this make sense?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|