|
Hi Ganegoda,
The + sign is nothing but used for string concatenation. have u noticed that 'id' is we are passing with the string where pub_id=....., thats why we need to concatenate with plus signs on both sides.
Take care.
Please let me know if you have still doubts.........
Best Regards,
Mohammed Hameed.
Be a good professional who shares programming secrets with others.
|
|
|
|
|
Hi.I host one page,i done that page in C#[ASP.Net].i just add one Label and given Text as "Welcome" after hosting this page when i open this page the page is blank,when i take the source of the page am getting Label1.text=Welcome what is the problem.should i set any property.
|
|
|
|
|
Are you sure it is not invisible? :->
|
|
|
|
|
It sounds like you have put some code in the wrong place. The server code runs on the server and is not visible in the html source, so somehow you have put the code somewhere where it's not server code any more.
I can't tell you any more than that without seeing any code.
---
single minded; short sighted; long gone;
|
|
|
|
|
The Following code is SourceCode [ HTML Code ].In the HTML Code can see one Label Control and the Text is Welcome,even that also is not displaying after hosting this page.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Photos.aspx.cs" Inherits="Photos" EnableSessionState="False" %>
<title>Untitled Page
<asp:label id="Label1" runat="server" style="z-index: 100; left: 188px; position: absolute;
top: 46px" text="Welcome" width="237px" backcolor="#0066FF" forecolor="White">
<asp:datagrid id="dgPhotos" runat="server" style="z-index: 102; left: 168px; position: absolute;
top: 79px" cellspacing="20" gridlines="None" onitemcreated="dgPhotos_ItemCreated">
<columns>
<asp:templatecolumn>
<itemtemplate>
<itemstyle font-bold="False" font-italic="False" font-overline="False" font-strikeout="False"
="" font-underline="False" horizontalalign="Center" verticalalign="Middle">
|
The Page Load Event as follows
protected void Page_Load(object sender, EventArgs e)
{
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(Request.MapPath("Photos"), "*.jpg"))
{
dt.Rows.Add(Files);
}
ds.Tables.Add(dt);
this.dgPhotos.DataSource = ds;
this.dgPhotos.DataBind();
}
}
|
|
|
|
|
Half of you code is missing or unreadable. Use the "Ignore HTML" option when you are posting markup code.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Guffa,
i am using the following code to export dataset data to excel in asp.net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Page.IsPostBack) Then
Dim con As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\Administrator\Desktop\a.mdb")
con.Open()
Dim ds As New Data.DataSet
Dim ad As New OleDbDataAdapter("select * from a", con)
ad.Fill(ds)
GridView1.DataSource = ds
GridView1.DataBind()
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
Response.Charset = ""
'// If you want the option to open the Excel file without saving then
'// comment out the line below
'// Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls"
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter()
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
GridView1.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()
End Sub
there is occuring an error
Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server.
but the control is under the form tag with runat server
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi Sonia.
Don't post questions in totally unrelated threads. Start a new thread, otherwise hardly anyone will see your question.
---
single minded; short sighted; long gone;
|
|
|
|
|
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();
}
}
}
|
|
|
|