Showing posts with label second. Show all posts
Showing posts with label second. Show all posts

Thursday, March 29, 2012

Newbie: how to navigate from one to another asp in the project

Hallo everybody!
I have two asp-pages in my project.
There is a task on the first one, when the solution of the task ok, then
should the second page come. I made a menu for this. If the task solution
ok, then becomes the menu visible. Is it possible to activate automatically
the menu if the task solution ok? I mean, without the click on it? It it
possible to do all this simplier? I think somethink like this:

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click

If MySolution=true then

MySecondASPpage should be shown (what to entere here??)

end if

end sub

Thanks

BarbaraYou may want to use Response.Redirect("PageNameHere")

- V
Barbara Schmidt wrote:

Quote:

Originally Posted by

Hallo everybody!
I have two asp-pages in my project.
There is a task on the first one, when the solution of the task ok, then
should the second page come. I made a menu for this. If the task solution
ok, then becomes the menu visible. Is it possible to activate automatically
the menu if the task solution ok? I mean, without the click on it? It it
possible to do all this simplier? I think somethink like this:
>
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
>
If MySolution=true then
>
MySecondASPpage should be shown (what to entere here??)
>
end if
>
end sub
>
>
>
Thanks
>
Barbara

Thursday, March 22, 2012

newline character - easy question

A Stupidly easy question - what is the newline character for VB.NET?

I have tried:
label.text = "first line \n second line"
and it doesnt work.

JagsYou could use VBCrlf or Environment.NewLine
If you want value in labe to come in next line then you have to use

"first line <br> second line"

[VBCrlf or NewLine dosn't work in HTML. So you have to use <br>]

hope it helps!
The VBCrlf was the one I wanted. Just wondering if I could put that into a sctring, i.e. instead of writing

label.text = "The is the first " & VBCrlf & "This is the second"

I could write something like

label.text = "This is the first \VBCrlf This is the second"
You can't do as below

label.text = "This is the first \VBCrlf This is the second" as it treates as a word in the string!