|
Hello,
I am running an ASP.NET application that works perfectly on the localhost but when I try to load on the browser from the server, I have the following error:
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customerrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customerrors> tag should then have its "mode" attribute set to "Off".
I did all mentioned in the details section but am still getting same error.. can some one help? I have worked on this for days...
|
|
|
|
|
|
Hello,
I will check this documentation...
Thanks for you reply though....
Commickey
|
|
|
|
|
Sir/Madam
My problem is that I have to check a textbox that it may contain some text or not on clicking a button if it not contain any text then i have to display a message box that you nave not entered any value or you have entered null. it may be done by using javascript or asp.net
Balwan Singh
|
|
|
|
|
For ASP.NET, look at the RequiredFieldValidator[^] control.
-- modified at 8:52 Monday 1st May, 2006
I hadn't noticed that you had already asked this question earlier. Did you not like the responses you got? They looked pretty good to me.
|
|
|
|
|
for javascript on the click of button call a function in javascript there check for value of text box if it is empty then display a alert box with message and return false else pass true without displaying the alert box.
|
|
|
|
|
Hi!
I created a class called HelperClass where I have a lot of methods that help me with situations like this one. Here goes the code of the method to provide an alert window:
public static void MsgBox(System.Web.UI.Page page,string msg)
{
msg = msg.Replace("'","\\'");
page.RegisterStartupScript("msg","alert('" + msg + "');");
}
I also have other methods, if you need them let me know. I also found some free online tutorials at www.KYNOU.com
I hope I helped.
sfdsfsdf
|
|
|
|
|
hi all,
Thanks in advance to you all.i have a html textbox in my asp.net form and i have email id's on that for validation.after finishing the validations i have to send the mails to the id's given in the text box.i want to know way to get the value of textbox to the c# code behind as the mail to send address of my application.please help me.
like
mail.To="value of the HTML textbox should come here"
with regards,
susa
-- modified at 7:11 Monday 1st May, 2006
|
|
|
|
|
All server controls have properties. You access a property's value using the syntax:
ServerControl.Property
The TextBox control has a Text property for retrieving or setting the text in the box. If your TextBox is named "MyTextBox", you would retrieve its value in C# this way:
string myText = MyTextBox.Text;
You might benifit from a look at the QuickStart tutorials on http://www.asp.net[^].
|
|
|
|
|
To get the value of a HtmlTextBox control from C# code behind, you have to convert the Control to a server control, not a web server control. just click on the control and select "Run as server control". set the ID propety in the preorties window.
or you can add 'id="UName" runat="server"' this snippet in the textbox tag in the HTML view.
example
initially your control looks like the below,
<input type="TextBox">
alter it to
<input type="TextBox" id="UName" runat="server">
know at the code behinde
you can use the below code to get the value
System.Web.UI.HtmlInputText txtName = new System.Web.UI.HtmlInputText();<br />
txtName = (System.Web.UI.HtmlInputText)this.FindConrol("UName");
now txtName.Value will give you the textbox value
hope this helps you
Cheer.
Ramesh.Kanjinghat
|
|
|
|
|
hi,
thank you ramesh for ur help by sparin ur time ,now i will try it out.i know it will work.
sudharson.g
with regards,
susa
|
|
|
|
|
I have a windows app project that I need to create an installer for distribution. How do I do that? Do I need a third party software?
|
|
|
|
|
Your question doesn't seem to refer to ASP.NET. You may want to post questions like these instead to a language-specific board in the future.
That being said, you could use the VS.NET's Setup project type to create a windows installation application.
|
|
|
|
|
I have to check a textbox text and if it is null while clicking the button then i have to show a message on alert box.
Balwan Singh
|
|
|
|
|
Write a javascript function
And call the function on button click
function script()
Dim s As String "alert('')"
RegisterStartupScript("", s)
end function
If textbox = "" then
Do stuff
else
script()
endif
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
-- modified at 5:32 Monday 1st May, 2006
|
|
|
|
|
Hi,
On click of the button call a javascript method in code behind,
Below is .aspx.cs page code:
For eg : Let server control button id be 'btnSave'
btnSave.Attributes.Add("OnClick","javascript:return ValidateTextBox();");
.aspx page code :
<script language="javascript">
function ValidateTextBox()
{
if(document.getElementById("txtName")!=null)
{
if(isEmptyCheck("txtName")==true)
{
alert("Text box value is empty,please enter value");
return false;
}
}
}
function isEmptyCheck(X)
{
if((document.forms[0].elements[X].value=="") || (document.forms[0].elements[X].value.substring(0,1) == ' '))
{
return true;
}
return false;
}
</script>
Hope this helps you...
|
|
|
|
|
Use the RequierdFieldValidator control
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
How to make a alert box on Button click
Balwan Singh
|
|
|
|
|
try:
response.write("alert('Hello!');")
Sheel Gohe
|
|
|
|
|
I have to check textbox that it is not null if null while clicking the butoon then a alert box appear with a message is that you have not entered anything?
Balwan Singh
|
|
|
|
|
Hi,
On click of the button call a javascript method in code behind,
Below is .aspx.cs page code:
For eg : Let server control button id be 'btnSave'
btnSave.Attributes.Add("OnClick","javascript:return ValidateTextBox();");
.aspx page code :
<script language="javascript">
function ValidateTextBox()
{
if(document.getElementById("txtName")!=null)
{
if(isEmptyCheck("txtName")==true)
{
alert("Text box value is empty,please enter value");
return false;
}
}
}
function isEmptyCheck(X)
{
if((document.forms[0].elements[X].value=="") || (document.forms[0].elements[X].value.substring(0,1) == ' '))
{
return true;
}
return false;
}
</script>
Hope this helps you...
|
|
|
|
|
Hi
I have upload an ASP.net Application on Apachi Server. I often get the Error like...
Invalid Viewstate Cleint IP X.X.X.X Disconnected.
I got a link on MSDN about this errors but can't understand how to solve this problem.
Please help me out of this problem.
Thanks in advance
Lets work it Out.........!
|
|
|
|
|
How can we get a reference of HTML Table bound to a GridView aconvert gridview as datasource. Like, if i want to add a new row to gridview at runtime, i can access its html table and add a new td to that.
Plz help me guys...
Thanks in advance
Sheel Gohe
|
|
|
|
|
Append the ID attribute to the table.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
set to properties for the HTML table. set ID and runat="server". or if you are adding the the table at design time, just right click on the table and select "Run as server control" and set ID property in the properties window. or go to HTML view and add the following line to the HTML table tag.
id="GiveSomeidhere" runat="server".
let us say id="TableID" runat="server"
now
HtmlTable htmlTable = new HtmlTable();
htmlTable = this.FindControl("TableID");
now you can do your codin using this htmlTable variable.
hope this will help you.
cheers
Ramesh.Kanjinghat
|
|
|
|