I have been trying to do this problem which seemed simple at first but has worked out to be very difficult for me. I basically want the font to change in real time, as in, the page will update immediately each time the font changes to show the font getting
bigger. I am able to have the font get bigger, although the problem is it happens all at once the page doesn't stop at any time to show that it is increasing. I have tried many things (Javascript function, different ASP functions/controls, messing with viewstate)
although my newbie ways have failed me so far. I put comments on the failed parts that I was unable to get to work. Thanks for any help/direction
For i As Double = 1 To 15
' Page.ClientScript.RegisterClientScriptInclude("something", "something.js") 'this isn't working
'ViewState("i") = i 'this isn't working
Label2.Text = ""
Label2.Font.Size = i + 1
Label2.Text += Environment.NewLine & "<font size=" & i & ">Welcome to the next part</font" & i & "><br>"
System.Threading.Thread.Sleep(250)
'Response.End() ' this isn't working
Next i
In my opinion, the method DarthSwian provide will meet your reqirement. In addition, tt seems like that you have resolved your issue in the similar thread below:
If you have resolved your issue, please don’t forget mark/vote the replies which helped you, and this will encourage the other community members to join in discussion and help each one.
Best wishes,
Please mark the replies as answers if they help or unmark if not.
Feedback to us
gloinz
Member
2 Points
5 Posts
How to see font size change in real time using ASP.net VB
May 21, 2012 02:37 PM|LINK
I have been trying to do this problem which seemed simple at first but has worked out to be very difficult for me. I basically want the font to change in real time, as in, the page will update immediately each time the font changes to show the font getting bigger. I am able to have the font get bigger, although the problem is it happens all at once the page doesn't stop at any time to show that it is increasing. I have tried many things (Javascript function, different ASP functions/controls, messing with viewstate) although my newbie ways have failed me so far. I put comments on the failed parts that I was unable to get to work. Thanks for any help/direction
For i As Double = 1 To 15 ' Page.ClientScript.RegisterClientScriptInclude("something", "something.js") 'this isn't working 'ViewState("i") = i 'this isn't working Label2.Text = "" Label2.Font.Size = i + 1 Label2.Text += Environment.NewLine & "<font size=" & i & ">Welcome to the next part</font" & i & "><br>" System.Threading.Thread.Sleep(250) 'Response.End() ' this isn't working Next iDarthSwian
Star
12771 Points
2361 Posts
Re: How to see font size change in real time using ASP.net VB
May 21, 2012 05:57 PM|LINK
Doing in code seems like more overhead since a postback is required. Take a look at this Jquery example and see if it fits your needs..
http://www.shopdev.co.uk/blog/font-resize.html
Seek and ye shall find or http://lmgtfy.com/
Catherine Sh...
All-Star
23373 Points
2490 Posts
Microsoft
Re: How to see font size change in real time using ASP.net VB
May 25, 2012 09:33 AM|LINK
Hi gloinz,
In my opinion, the method DarthSwian provide will meet your reqirement. In addition, tt seems like that you have resolved your issue in the similar thread below:
http://forums.asp.net/t/1805970.aspx/1?How+to+see+font+size+change+in+real+time+using+ASP+net+VB
If you have resolved your issue, please don’t forget mark/vote the replies which helped you, and this will encourage the other community members to join in discussion and help each one.
Best wishes,
Feedback to us
Develop and promote your apps in Windows Store