|
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
|
|
|
|
|
Hi,
I was wondering if I can filter the FileField control (used to upload files) to only display specific files on your hard drive?
Something similar to the OpenFileDialog for win forms?
openFileDialog1.Filter = "Cursor Files|*.cur";
thanks,
Ron
|
|
|
|
|
You can't.
--------------------------------------------------------
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!
|
|
|
|
|
|
Hi!
There is a website that contains free online tutorials. I searched using the keyword "fileupload" and I found a tutorial that walked me through the process of using fileUpload. I hope this helps you.
The website is www.KYNOU.com
sfdsfsdf
|
|
|
|
|
Dear Sir and Madam,
I only change text on my Default.aspx file, but I must compiled project and upload all files in bin folder?
I use "Microsoft Visual Web Developer 2005 Express Edition".
It don't like asp.net 1.1
Is there any way I only upload the Default.aspx file?
Sorry for bad English.
Best Regards.
|
|
|
|
|
Since you are working with VS2005 it is most likely that you are using ASP.NET 2.0. In that case you con't have to copy everything, just the file that has changed.
--------------------------------------------------------
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!
|
|
|
|
|
I am doing a project for school and am in need of some cool web services anyone know of any?
Tim St.Martin
|
|
|
|
|
Hi there,
Do you mean the cool web service in terms of the functionality or implementation? Or what else do you mean? Does Google bring up anything? Anyway, the link below can get you started:
Web Service Developer Center[^]
|
|
|
|
|
|
how to open a word document in a web browser. OR to opening a word document in a separate window.
Deepak Anish
Computer Programmer
Maxumise Fiji Ltd
Suva, Fiji
|
|
|
|
|
Just link to the document. It will either open in the browser, in a separate window or in MS Word, depending on what is installed on the client computer and how the browser is set up to handle that file type.
You should put something next to the link, like a document icon, to show the user that it will open a document, and not just a web page.
---
b { font-weight: normal; }
|
|
|
|
|
YEP..that is ok but i want the word document to be in the browser where the user can type in that document and save it directly to the database either by clickiing a save button OR by saving for the menu bar.
Deepak Anish
Computer Programmer
Maxumise Fiji Ltd
Suva, Fiji
|
|
|
|
|
Word can't save to a database. You would have to put the file in a folder in your web where the user has write access, for the program to be able to save the file back.
---
b { font-weight: normal; }
|
|
|
|
|
what if we save that as an object (OLE) in the database .....
Deepak Anish
Computer Programmer
Maxumise Fiji Ltd
Suva, Fiji
|
|
|
|
|
Word still can't save to a database or upload a file. When the user has saved the file you have to get it and put it in the database.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I'm new to ASP.NET and have built an ASP.NET (in C#) program that checks to make sure the characters that are entered into a textbox is a decimal.
decimal.Parse(textbox.Text);
The try/catch statement fails if this is entered: 88.95
but this does not: 88,95
Is it something that I'm doing wrong, or has the hosting company configured ASP.NET to a European standard?
Thanks,
Ron
|
|
|
|
|
myNameIsRon wrote: has the hosting company configured ASP.NET to a European standard?
They probably have, judging from your results. You shouldn't rely on the configuration of the server, though. You should provide a CultureInfo or NumberFormatInfo to the parsing method.
Don't use the decimal data type unless you have some special reason. The decimal data type is not supposed to represent a normal floating point number. Use the double data type.
Also use the double.TryParse method to parse the string, to avoid using exceptions.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa for the great info!
I did what you said (NumberFormatInfo) and it works great now!
I'll study up on the TryParse... thanks again.
Ron
|
|
|
|
|
I am new to asp.net please guide me what is diff between asp.net and asp.net2.0
|
|
|
|
|
ASP.NET 2.0 is the current version of the ASP.NET web application platform. Among the features it adds:
- a host of new server controls, including data source, login, navigation, and web part controls
- support for master pages, themes, and skins to assist developers with page layout
- a full membership API to support authentication and authorization requirements typical of commerce and community web sites
- a number of caching improvements
- a number of language enhancements for VB.NET and C#
- a bunch more stuff
Take a look at the quickStart tutorials on http://www.asp.net[^] to get you started.
|
|
|
|