|
SORRY.......
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
I am just starting out with programming asp.net and have purchased an asp.net webhosting wiht DailyRazor.com.
I then tried to build a simple webpage (in C# as this is the language I am familiar with) with Visual Studio 2005, which gave me 2 files:
Default.aspx
Default.aspx.cs
(when i run 'Run without debugging' in VS, it seems to work OK on my local webserver)
But when I uploaded both these files to my 'httpdocs' folder on the webhost folder
and I try to run file Default.aspx, I get the error:
"Could not load type '_Default'."
But if I remove the 'Inherits="_Default"' part, I get error:
"The 'CodeFile' attribute is not supported by the 'page' directive."
This is the code contained in default.aspx:
<br />
<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
Hello World - my first C# webpage !!<br />
</div><br />
</form><br />
</body><br />
</html><br />
<br />
And the code file:
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
public partial class _Default : System.Web.UI.Page <br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
}<br />
<br />
If anyone knows of a good tutorial which shows how to create a simple webpage in VS2005 (language C#, for the code-behind anyway) and then upload it to a webserver (though I thought this would have been the same as whatever works on the local server) that would be a great help.
Many thanks,
Gerry
asp.net newbie
|
|
|
|
|
are u using .net 2003 or .net 2005?
Best Regards
3ala2
|
|
|
|
|
Well - seeing that he said he was using Visual Studio 2005, it's a fair bet (read he must be) that he's using .NET 2. (There isn't a .Net 2003 or .Net 2005).
I also fail to see what relevance this has to his problem. That's like asking if he's developed this on a Dell or an Acer - totally irrelevant.
|
|
|
|
|
Sometimes low knowledge and some attitude would cause u problems Pete
When u know nothing about configuration don't talk about configuration
And by the way, my McAfee needed a patch to run on my Dell while it didn't need that patch to run on my other PC!
Best Regards
3ala2
|
|
|
|
|
Bonjour Gerry
How did you upload your site?
Select Build > Publish Web Site. You will find that you can select a site to create a precompiled uploadable version of the site. When you build the site, you have a DLL that contains the code that you need. Publish this version to your website instead.
|
|
|
|
|
Hi gvanto,
Some hosting servers have index page as default or default page as default.
so you better to try with index page by giving redirect to that default page.
I hope this works fine.check u r hosting server once and do this.
Regards,
Niranjan
|
|
|
|
|
Hi,
Is there a way of extending the ContentPlaceHolder Class and using the extended class in the MasterPage?? If so, would I have to implement my own asp:Content control and hook it up with my custom asp:ContentPlaceHolder control??
Please can someone explain this concept to me?
Regards,
ma se
|
|
|
|
|
Perhaps you can, but why?
Perhaps you should explain what it is that you are trying to accomplish, instead of asking things about the way that you think that it's done.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello anyone knows how to convert http to https. i need one example does any one know anything about this .I already register versign but i need to know how to put the lock in the sensitive information.
Can any one give me one example .Thanks In advance
|
|
|
|
|
aditya.net wrote: convert http to https
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hello Do u know anything about SSl.Then u can understand what i am telling. convert http to https.
|
|
|
|
|
You don't convert from http to https. You take the files/pages you want under SSL where they belong. Sorry, I know how to do it in Apache, but not IIS.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Yeah Thnks For u r reply Paul . Can any one don with IIS.
|
|
|
|
|
|
hi aitya.net,
https works only if you have SSL for your site.
Regards,
Niranjan
|
|
|
|
|
Hi.I add command field[Edit,Delete] in the gridview for editing or deleting the selected row cell value.and i right click the gridview - choose datasource-select object-then i click update i select the following method but the next button is not enabling still disabled.what is wrong with this method or how can i call the object for editing or deleting the gridview.
public void EditUsefulHeading(string PKey,string HEADING)
{
using (SqlConnection conn = new SqlConnection(ConnectionString))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand("UPDATE USEFULLINKSM SET HEADING=@HEADING WHERE PKEY=@PKEY", conn))
{
SqlParameter HEADINGS = new SqlParameter("@HEADING", HEADING);
SqlParameter PKEYS = new SqlParameter("@PKEY", PKey);
cmd.Parameters.Add(HEADINGS);
cmd.Parameters.Add(PKEYS);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
}
}
}
|
|
|
|
|
Hi. in my web application there is a option for showing the photos,when click photos button will load photos.aspx page and am keeping the images in the server folder name Photos.in my local machine while loading the page i will get all the images which i store in the Photos folder,but i host this page and open this page am not getting any images.the page load event as follows.what is wrong with this code.somebody can help me.
if (!IsPostBack)
{
DataSet ds = new DataSet();
DataTable dt = new DataTable("Photos");
dt.Columns.Add("Photos", Type.GetType("System.String"));
foreach (string Files in Directory.GetFiles(Server.MapPath("Photos"), "*.jpg"))
{
dt.Rows.Add(Files);
}
ds.Tables.Add(dt);
this.dgPhotos.DataSource = ds;
this.dgPhotos.DataBind();
}
|
|
|
|
|
Sounds like a permissions problem. Do you have view permissions to the root of the drive you are trying to view? Another option is to use classic asp style of debugging and output any errors, or even the path of the photos folder.
Darroll
|
|
|
|
|
The Directory.GetFiles returns an array of physical file paths on the server. As long as the server is the same computer as the client computer, you will be able to see the images, as you see the images that are stored locally on your computer, as they happen to have the exact same file path as the images that are stored on the server, as they happen to be the exact same files. When you view the page on the hosted server, the images are only stored on the server, so when you try to view the images they are not there, as you no longer have a local copy of the images on your computer with the same file paths as on the server.
You have to make sure that you use the virtual path to each image, not the physical path, when you put them on the page.
---
single minded; short sighted; long gone;
|
|
|
|
|
HI,
I am fecthing varbinary data from data base and converting it to Image data.
i got error of 'Parameter is not valid'
i use this code
<br />
System.Drawing.Image img;<br />
byte[] photobyte = (byte[])dtPhoto.Rows[0][0];<br />
using (MemoryStream stream = new MemoryStream((byte[])dtPhoto.Rows[0][0]))<br />
{<br />
img = System.Drawing.Image.FromStream(stream);
img.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);<br />
}<br />
Thanks
|
|
|
|
|
Why are you using Response.OutputStream instead of the stream var you just created?
Ben
|
|
|
|
|
Hi ben i use Response.OutputStream for display image on Page.
thanks for reply...
|
|
|
|
|
Are you trying to change the file format of the image, or why are you loading and saving the image?
If you just want to send the image to the browser, don't use any Image object, just send the bytes.
---
single minded; short sighted; long gone;
|
|
|
|
|
Well i try it too but dont work can please tell me how to send the byte??
thanks for your reply..
|
|
|
|