Hi,
Try it
http://webshop.langauto.hu/callback.aspx if you enter 100000 into textbox it works fine. If you enter 300000, it shows nothing. But the server sends back the response
Code:
<asp:Content ID="Content1" ContentPlaceHolderID="C1" Runat="Server">
<script type="text/javascript">
function cb() {
eo_Callback('cbTest');
}
</script>
<br />
<eo:CallbackPanel ID="cbTest" AutoDisableContents="true" runat="server" Height="150px" Width="200px">
size of text in response<asp:TextBox ID="TextBox1" runat="server">300000</asp:TextBox>
<a href="javascript: cb(); ">
<asp:Label ID="lblPcikkszam" runat="server" Font-Bold="True" Text="Click" Font-Names="Verdana" Font-Size="X-Small"></asp:Label>
</a>
<div style="width:770px;word-wrap: break-word;">
<asp:Label ID="Label2" runat="server" Text="Response"></asp:Label>
</div>
</eo:CallbackPanel>
</asp:Content>
Protected Sub cbTest_Execute(ByVal sender As Object, ByVal e As EO.Web.CallbackEventArgs) Handles cbTest.Execute
Dim gd As New GlobalData(Me.Session, Me.Response.Cookies, Me.Request.Cookies)
Dim str As String = GenerateRandomString(1000, False)
Dim meret As Integer = TextBox1.Text
Dim x As String = GenerateRandomString(1000, False)
While str.Length < meret
x = GenerateRandomString(10, False)
str = str + x
End While
Label2.Text = "Size: " + str.Length.ToString + "<BR>" + str
End Sub
Public Function GenerateRandomString(ByRef len As Integer, ByRef upper As Boolean) As String
Dim rand As New Random()
'Threading.Thread.Sleep(1)
Dim allowableChars() As Char = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ0123456789".ToCharArray()
Dim final As String = String.Empty
For i As Integer = 0 To len - 1
final += allowableChars(rand.Next(allowableChars.Length - 1))
Next
Return IIf(upper, final.ToUpper(), final)
End Function