Showing posts with label vb. Show all posts
Showing posts with label vb. Show all posts

Monday, April 26, 2010

live updates while executing long process in asp.net

Hello friends,
if you have a long query or process to execute in ur asp.net application,
i have a very efficient and attractive looking program which u can use in ur application.
my project is in c#,
when u start executing the long process it shows the status of the process on the page in percentage. so user can know how much he needs to wait.
i can not post the code here.
if u want my help then contact me.
i will email u.

Screen Shot of my project


info@amitech.co
www.amitech.co

Friday, April 23, 2010

How to send values from one aspx page to another aspx page using "post method"

Problem:
How to send values from one aspx page to another aspx page using "post method"

Solution:
Create a class named RemotePost.vb
and add the following code in that class

Imports Microsoft.VisualBasic

Public Class RemotePost

    Private Inputs As System.Collections.Specialized.NameValueCollection = New System.Collections.Specialized.NameValueCollection

    Public Url As String = ""
    Public Method As String = "post"
    Public FormName As String = "form1"
    Public Sub Add(ByVal name As String, ByVal value As String)
        Inputs.Add(name, value)
    End Sub
    Public Sub Post()
        System.Web.HttpContext.Current.Response.Clear()
        System.Web.HttpContext.Current.Response.Write("")
        System.Web.HttpContext.Current.Response.Write(String.Format("", FormName))
        System.Web.HttpContext.Current.Response.Write(String.Format("


", FormName, Method, Url)) Dim i As Integer = 0 Do While i < Inputs.Keys.Count System.Web.HttpContext.Current.Response.Write(String.Format("", Inputs.Keys(i), Inputs(Inputs.Keys(i)))) i += 1 Loop System.Web.HttpContext.Current.Response.Write("
") System.Web.HttpContext.Current.Response.Write("") System.Web.HttpContext.Current.Response.End() End Sub End Class


now from any page from which u want to pass the value
use the following code

Dim myremotepost As RemotePost = New RemotePost
myremotepost.Url = "targetURL.aspx"
myremotepost.Add("param_name", "param_value")
myremotepost.Post()
 for c sharp version mail me
info@amitech.co
www.amitech.co

Amitech

Hell0 Friends,
i know you are stuck with some serious problems and that's why you are here. So friends i m putting all the solved problems(with solution) that i have faced in my life (technical problems) on this blog.
In case you can not find the proper solutions, feel free to mail me at info@amitech.co
Amit Panchal