Community discussion forum
ASP.NET Web Forms
-
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 agoby
Matthew86T
Matthew Taylor
Sacramento, California, United StatesJoined 5 years agoThis 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 agoby
Matthew86T
Matthew Taylor
Sacramento, California, United StatesJoined 5 years agoHey it was a problem with my web provider, they had to enable asp.net on my site. Thanks anyways!
-
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 -
Response.Redirect("newpage.aspx")
? -
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 -
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. -
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. -
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 -
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 -
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 -
-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. -
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. -
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. -
You can try this one:
MessageBox for ASP.NET from http://www.bassilsoft.com -
how to access a method declared in a web user control form(.ascx) into a web form(.aspx) in asp.net?
-
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 -
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
-
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.
-
does anyone know how to creat e a message box on a web page using asp.net using code behind?
-
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 -
Do it like below
<a href="link.aspx?id='"& var &"'>link</a>
ok? -
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. -
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 -
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
-
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 -
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 -
what the code to create a messagebox in asp using c# language ?
-
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.- 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;
- create an object for the usercontrol
myControl objControl = new myControl();
- call the method using the created object
objControl.<methodname>
- include the .ascx file name in the myPage.aspx by 'using' clause if the usercontrol and the web form are in different folders
-
string message = strConn;
string alertScript = "<script language=JavaScript>";
alertScript += "alert('" + message +"');";
alertScript += "</script" +">";
if (!IsClientScriptBlockRegistered("alert"))
this.RegisterClientScriptBlock("alert", alertScript); -
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.
-
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 ?
-
Use window.confirm()
-
3 years agoby
HardlyNoticable
Stephen Akins
London, Ontario, United KingdomJoined 3 years agoPeter: 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
Quick links
Recent activity
- Luc Joly replied to Help with datagridview
- MA Awan replied to adding a box to rtb
- Vish Rao replied to Anyone needing Application ...
- sampada godbole replied to Sharepoint : GroupBy result...
- Amol Benare replied to Receiving bulk SMS using AT...
- Amol Benare replied to Receiving bulk SMS using AT...
Enter your message below
Sign in or Join us (it's free).