|
your code seems to be fine.
actually whats happening is that when user uploads a file, first it goes to server n then the server checks whether is it lesser than the allowed file size (in your case, your code
if (videoUpload.PostedFile.ContentLength <= ideoSize) is executed when the file is fully uploaded to the server ) , if yes then its ok otherwise show message.
Im not sure but u can search on net and try to do it with javascript.
Good luck
|
|
|
|
|
Hi.am doing project in C# [ ASP.Net ].i done 3 pages,so i want to test these pages in the website.i upload one page the name of the page is Photos.aspx and Photos.aspx.cs also.then i open the website www.somename.com/Photos.aspx getting page not found.i upload web.config,APP_Code and APP_Data also eventhough same error is coming.should i upload anything.but i am trying www.somename.com/index.html will get the page.what is the problem with .Net pages.
|
|
|
|
|
Use the Publish Web Site option in the Build menu.
---
single minded; short sighted; long gone;
|
|
|
|
|
Now i publish the website,and i upload Photos.aspx,PrecompiledApp.config,Web.Config and bin folder eventhough while selecting www.somename.com/Photos.aspx the page is not getting,showing page not found.
|
|
|
|
|
What is the exact error message that you get? Have you disabled "friendly http error messages" in the browser so that you get a useful error message?
If the error message really is "file not found" (http 404), then you haven't uploaded the page to the correct location.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have ported my Visual Studio2003/asp.net 1.1 web application on to Visual Studio 2005/asp.net2.0 platform. One page of this web application behaves strangely. On the home page of the application there is a header control and footer control. These user controls have links which allows users to go to various pages upon clicking. All except one link somehow behaves differently. This link however upon clicking opens up correct page but on clicking any button or even doing selected item change on drop down box on the page displays error like “The page can not be displayed” and “cannot find Server or DNS Error”. The server on which this web application is deployed is Windows 2003 sever with IIS 6.0 and asp.net 2.0 and .Net Framework 2.0. I even created a brand new page with just a button control and a text label. But clicking on this button I get the same error message as above. It seems that Post back event is failing. The Header Control implements IPostBackEventHandler and IPostBackDataHandler interface defined in Microsoft Library. This application works fine in with Visual Studio2003/asp.net 1.1.
Can any one please shed light how to solve this problem?
I would like to thank you in advance for your help.
|
|
|
|
|
Have you checked through all of your connection points?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi Paul,
Thank you for your reply. I assume that your mention of connection points refers to database connection and yes I cheked them all they are ok.If meaning of connection points is different then please let me know.
Bharat.
|
|
|
|
|
Is the web server correct too? I am wondering if it is a network matter...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Yes the webserver is on network. But same was the case earlier too during deployment in Framework1.1 enviornment.
|
|
|
|
|
Sounds like the trouble link is pointing somewheres it shouldn't. Not sure how much more help I can be. Will give it some thought
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi Paul,
Thank you. I will appreciate any help.
Bharat.
|
|
|
|
|
Hi All
I want just a simple HTML page in which people send comments to my email address.
Can any one give me code for that.
Thanks in Advance.
|
|
|
|
|
simple HTML page will not do it for u...u need server side coding for that.
Regards
Bino
|
|
|
|
|
We cannot do your home work.
Try yourself and tell,i did this,but it is showing this error, how can i solve my problem?
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Your only option to do that on a simple html page is to use an mailto: url in a form. This will use the mail program on the visitors computer, so it will of couse only work from a computer that actually has a mail program installed with a working email account.
---
single minded; short sighted; long gone;
|
|
|
|
|
If you don't want to go down the line of developing your own server-sode code for this, and your website is hosted by an independednt ISP, ask them - most offer a cgi script you can utilise to do this.
Fred
|
|
|
|
|
Hello,
I have doubt regarding the accessing posted data to webpage. I developed an NSIS installer where i can post data to webpage but i want to know how can i access that posted data using asp.net?
Can i use the request.form("serialcode")where serialcode="data posted from the application".
Please give some thoughts on this issue.
Thanks
|
|
|
|
|
I am working in a ASP.NET project.I have a textbox.in this text i have to check the user to not enter any value other than numeric without going server.
i need help how i do it at client side.
any one help me.
|
|
|
|
|
u can do validation using Javascript.
function IsNumeric(sText)
{
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
}
return IsNumber;
}
Regards
Bino
|
|
|
|
|
<script type="text/javascript"><br />
function filter(e) {<br />
var ascii;<br />
if (e && e.charCode) {<br />
ascii = e.charCode;<br />
} else if (event && event.keyCode) {<br />
ascii = event.keyCode;<br />
} else {<br />
return true;<br />
}<br />
<br />
if (ascii < 48 || ascii > 57) return false;<br />
return true;<br />
}<br />
<br />
window.onload = function () {<br />
document.forms[0].elements['test'].onkeypress = filter;<br />
document.forms[0].elements['test'].onpaste =<br />
function () {<br />
return false;<br />
}<br />
}<br />
</script><br />
.....<br />
<form><br />
<input type="text" name="test" /><br />
</form><br />
This might Help you.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
This Javascript function
function chkQty(qty) {
var regex = /^\d+$/;
if ( !regex.test(qty) ) {
alert('Please enter a number larger than 0');
return false;
}
return true;
}
will return true only for +ve whole numbers passed to it, so you can use it to check the textbox entry on submiting the form, or even on the onblur event of the box itself
|
|
|
|
|
Use RegularExpressionValidator then open properties and simplye write down \d{0,9} in validation expression property. It will validate on client side.
|
|
|
|
|
In addition to what was already written:
If you are writing an asp.net ajay enabled web application then you can use the FilteredTextBoxExtender and specify its type as numeric.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Hi
I ahve been tryin to get this datagrid to show my query results for ages now and I jus get a blank screen, any suggestions?
Sub bindData()
'1. Create a connection
Dim connectionString As String
connectionString = "Server=localhost; uid=jshort; pwd=oasisarab;database=ftp1;"
'Builds .net mysql connection and passes connection string into method
Dim connection As New MySqlConnection(connectionString)
Const sql As String = "select UserId, username, groups, joindate from Users;"
'Create mySql command string for passing query or SPROC(Stored Procedure)
Dim cmdString As New MySqlCommand(sql, connection)
'Set Command to equal mySql connection,t so can pass SQL query
'3. Create the DataAdapter
Dim da As New MySqlDataAdapter()
da.SelectCommand = cmdString
'4. Populate the DataSet
Dim ds As New DataSet()
da.Fill(ds)
'5. Set the datagrid's datasource to the dataset and databind
dgUsers.DataSource = ds
dgUsers.DataBind()
End Sub
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>System Users</title>
</head>
<body>
<asp:datagrid id="dgUsers" runat="server" BorderWidth="0"
CellPadding="2" Width="100%"
Font-Size="Smaller"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="True"
HeaderStyle-BackColor="Navy"
HeaderStyle-ForeColor="White"
AlternatingItemStyle-BackColor="#dddddd">
</asp:datagrid>
</body>
</html>
|
|
|
|