Community discussion forum

ASP.NET Web Forms

This is a comment thread discussing ASP.NET Web Forms
  • 9 years ago

    This thread is for discussions of ASP.NET Web Forms.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 5 years ago

    This is great info and it works superb with IIS, but how are you all getting the files to work on your site?  I uploaded all the files, enabled folder actions did everything I can think of, but still can't seem to get it to work.  The files are here so you can see what I'm doing wrong.  Thanks!

  • 5 years ago

    Hey it was a problem with my web provider, they had to enable asp.net on my site.  Thanks anyways!

  • 5 years ago

    Hi,


     I am beginer to ASP.Net. Can u tell how to call new page from the existing page.
     In VB.net by executing the statement "Form2.show()", New page will be loaded. In the same way how to load new page in ASP.Net   ?


    Thank U
    Suresh

  • 5 years ago

    Response.Redirect("newpage.aspx")


    ?

  • 5 years ago


    Hi,


    Please tell me what is the difference between "Web Form" and "HTML Form", and "Web Controls" and "HTML Controls" in ASP.Net.


    Thanx
    Suresh

  • 5 years ago

    Hi,


    Hope somebody will assist me. Have been doing ASP but i want to shift to ASP.NET.
    My problem is the software requirement and setting the environment to write ASP.NET websites.


    May somebody help?


    Cheers,
    Nicholas.


  • 5 years ago

    I am new to ASP.NET, please help me how use Message Box on ASP.NET Web Form?  I know used in VB is (Msgbox("message here"), so what is the key word use in ASP.NET Web Form.


    Thanks.

  • 5 years ago

    Hi atan


    there's no keyword for displaying a MessageBox in ASP.NET. You have to register a ClientScriptBlock and Invoke this. Here's an exampla page


    Code:
    <%@ Page Language="C#" %>
    <script runat="server">
       void Button1_Click(object sender, EventArgs e)
       {
           string message = "MessageBoxTest";
           string alertScript = "<script language=JavaScript>";
           alertScript += "alert('" +message +"');";
           alertScript += "</script" +">";


           if (!IsClientScriptBlockRegistered("alert"))
               this.RegisterClientScriptBlock("alert", alertScript);
       }


    </script>
    <html>
    <head>
    </head>
    <body>
       <form runat="server">
           <asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
       </form>
    </body>
    </html>



    There also exists a free MessageBox Server-Component. You'll find it here
    MessageBox

  • 4 years ago

    Hi Aton,
    As SVKoli has said, its always better to comibe the code with client side scripts.
    Java Script or J Script will help you to do this... since Javascript is allmost read by all browsers.


    care
    scienty

  • 4 years ago

    Hi Aton,
    As SVKoli has said, its always better to comibe the code with client side scripts.
    Java Script or J Script will help you to do this... since Javascript is allmost read by all browsers.


    care
    scienty

  • 4 years ago

    -A Web Form refers to the .aspx page that inherits from the System.Web.UI.Page class.
    -There is also an HtmlForm class that allows you to create and control an Html <Form> tag on the server.  You can create this in your .aspx page using <form runat="server"> and must place your input related tags/controls (buttons, text boxes, etc.) inside it. This will be rendered to the client as the standard HTML <form> tag.  
    -Web Controls are a group of classes in the System.Web.UI.WebControls namespace, such as labels, repeaters and datagrids, as well as the form related controls such as text boxes and buttons.
    -Html Controls are a group of classes similar to the web controls but they are in the System.Web.UI.HtmlControls namespace and are very simple controls that represent Html tags such as the HTML form mentioned above, buttons, text boxes, etc.  HtmlControls generally are not as feature rich as Web Controls and there are less of them.

  • 4 years ago

    Check out web matrix at http://asp.net/webmatrix/default.aspx?tabIndex=4&tabId=46


    it has a built in web server and database for learning and writing asp.net pages.

  • 4 years ago

    you cann't call "Form2.show()" to let a new WebForm to show up..



    That's the Windows application 's methd, could not work on Webform in ASP.NET.


    You can use Transfer("NewPage2.aspx") or Redirect("xxx.aspx") at server side .vb code.

  • 4 years ago

    You can try this one:


    MessageBox for ASP.NET from  http://www.bassilsoft.com

  • 4 years ago

    how to access a method declared in a web user control form(.ascx) into a web form(.aspx) in asp.net?

  • 4 years ago

    hi guys, iam just new to asp.net
    could somebody pls tell me how to pass the values of aspx form to another aspx page? it should happen when u click the "submit" button. i know how to do it in asp. but not in asp.net.
    thanks in advance

  • 4 years ago

    Quote:
    [1]Posted by bvsuresh_reddy on 28 Feb 2003 03:41 AM[/1]
    Hi,


     I am beginer to ASP.Net. Can u tell how to call new page from the existing page.
     In VB.net by executing the statement "Form2.show()", New page will be loaded. In the same way how to load new page in ASP.Net   ?


    Thank U
    Suresh

  • 4 years ago

    Quote:
    [1]Posted by kimkakwe on 8 Aug 2003 10:13 AM[/1]
    Hi,


    Hope somebody will assist me. Have been doing ASP but i want to shift to ASP.NET.
    My problem is the software requirement and setting the environment to write ASP.NET websites.


    May somebody help?


    Cheers,
    Nicholas.



  • 4 years ago

    does anyone know how to creat e a message box on a web page using asp.net using code behind?

  • 4 years ago

    this should do it......


    Dim Message as string = "Alert Box from Code Behind."
    Dim strScript As String = "<script language=JavaScript>"
    strScript += "alert(""" & Message & """);"
    strScript += "</script>"
    If (Not Page.IsStartupScriptRegistered("clientScript")) Then
        Page.RegisterStartupScript("clientScript", strScript)
    End If

  • 4 years ago

    Do it like below
     <a href="link.aspx?id='"& var &"'>link</a>
    ok?

  • 4 years ago

    I am new to ASP.NET, please help me how use Message Box on ASP.NET Web Form?  I know used in VB.net is (Messagebox("message here"), so what is the declaration and key word use in ASP.NET Web Form.


    Thanks.

  • 4 years ago

    For Passing value from one page to another use this code


    Response.redirect("url of page")



    Make read only property for each value u want send on other page.


    On load event of other


    dim strmain as main (object of that page)


    objmain = CType(context.Current.Handler, main)


    and use all property here.


    Bye & take care

  • 4 years ago

    I used this code:


    <script language="VB" runat="server">
    Sub InfoBox(Mensagem as string)
     Dim NewScript as string
     NewScript = "<script language=JavaScript>"
     NewScript = NewScript & "alert('" & Mensagem  & "');"
     NewScript = NewScript & "</script" & ">"
     If ( Not IsClientScriptBlockRegistered("alert")) then
      RegisterClientScriptBlock("alert", NewScript)
     End If  
    End Sub
    </script>



    invoke =>  InfoBox ("Hello")




    Does anyone know how to change the icon that appears, i want an info icon and not an exclamation icon !



    Many thanks

  • 4 years ago

    Hi,


    The examples are fine, they are working. But how about passing the values among 3 or 4 pages ?.


    I mean, if there is any values entered in 1.aspx file, then I should be able to retrieve back in 3.aspx and send it back to 4.aspx file ?. How do I do that ?.


    Is there any better way of doing it ?. Please help.


    Thanks.


    Regards,
    Karthick

  • 4 years ago

    on page1.aspx
    - you have a form with a textbox with id="txtBox"
    - user fills it out and clicks submit
    - do your validation if need be and then System.Web.HttpContext.Current.Server.Transfer("page2.aspx", True)


    on page2.aspx
    - in the Page_Load put RegisterHiddenField("txtBox", Request("txtBox"))
    - you have another form with whatever fields
    - user fills it out and clicks submit
    - do your validation if need be and then System.Web.HttpContext.Current.Server.Transfer("page3.aspx", True)


    on page3.aspx
    - in Page_Load do a response.write(Request("txtBox")
    - the value of the textbox called "txtBox" from page1.aspx should display

  • 3 years ago

    what the code to create a messagebox in asp using c# language ?

  • 3 years ago

    The methods declared in the User Controls can be called directly in a .aspx page by creating an object for the .ascx user contol page.


    Following are the steps:


    Let us consider the names of the usercontrol and web form are myControl.ascx and myPage.aspx and the usercontrol is in the folder named UserControls.



    1. include the .ascx file name in the myPage.aspx by 'using' clause if the usercontrol and the web form are in different folders
          using UserControls;

    2. create an object for the usercontrol
          myControl objControl = new myControl();

    3. call the method using the created object
           objControl.<methodname>

  • 3 years ago

    string message = strConn;
    string alertScript = "<script language=JavaScript>";
    alertScript += "alert('" + message +"');";
    alertScript += "</script" +">";


    if (!IsClientScriptBlockRegistered("alert"))
    this.RegisterClientScriptBlock("alert", alertScript);

  • 3 years ago

    anyone can please tell me  how to create a message box with ok & cancel buttons on a web page using asp.net using code behind ? Actually i am new to .NET. i reqire it urgently.

  • 3 years ago

    Quote:
    [1]Posted by surendar on 10 Jan 2005 11:47 PM[/1]
    what the code to create a messagebox in asp using c# language ?


    http://www.developerfusion.co.uk/show/4700/
    see this.

  • 3 years ago

    Use window.confirm()

  • 3 years ago

    Peter: You are using an alert box.  I'm pretty sure that only the exclamation icon is your only option.


    svkoli: I get the following error when I try to use your box:


    CS0122: 'testresults.Button1_Click(object, System.EventArgs)' is inaccessible due to its protection level


    Any idea what I need to do?

Post a reply

Enter your message below

Sign in or Join us (it's free).