|
I using VS 2003 create a aspx web page consist a datagrid to show the data. the data retreive from database. So my situation is , i want to change the data in the datagrid and then print the new data without saving into database(means i don't want update to my database, i want remain the old database) ,i want to print out the new data in datagrid ...do u have any idea ?
Best regards,
Chee ken
|
|
|
|
|
you can use dataset for this pupose. What you need to do is to do all the operation in the dataset only.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Can anyone plz tell me what's is the different between vb.net and asp.net?
|
|
|
|
|
ASP.NET is a platform for developing web applications.
VB.NET is a programming language.
VB.NET is one of the languages that you can use in ASP.NET.
---
b { font-weight: normal; }
|
|
|
|
|
VB.Net is not a programming language, it is a tool for creating appications.
|
|
|
|
|
Suresh Dayma wrote: VB.Net is not a programming language
Yes, it is.
---
b { font-weight: normal; }
|
|
|
|
|
Can anyone suggest good books for ASP .net. I need books for basics and advanced programming in ASP .net .
Meena
|
|
|
|
|
you can go for the books of wrox publications for begginning of asp.net.
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Hi,
The mistake is that the varaiable 'presentCount' is initialized to Zero inside of the RowDataBound event handler. So every time the row is created ( it may be header, data , footer, etc. whatever may be) , that variabe is initialized to zero.
Check it !!
Regards,
Jay
|
|
|
|
|
I have a MainMaster Page. I created SubMaster page using the above MainMaster page.
I creted a Content Page called MyContentPage using this SubMaster Page. I have a Label
inside the SubMasterPage. I want to Grab the Value of the Label in my MyContentPage.
This is what i did for this
I have a label like this in SubMaster Page.
asp:Label ID="Label1" runat="server"
In SubMaster Page cs file i just assign a string called Test to the Label1
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Label1.Text = "Test";
}
}
In MyContentPage i did this below
protected void Page_LoadComplete(object sender, EventArgs e)
{
string test = (Master.FindControl("Label1") as Label).Text;
}
The above one is throwing up an null point exception error
Object reference not set to an instance of an object
Now i Created a content page using the MainMaster Page and repeated the above process
and it seems to work fine(i.e able to pass the label value from MainMaster Page to Content Page)
Can you guys tell me what iam doing wrong with the first case as soon as possible
-- modified at 20:19 Wednesday 16th August, 2006
|
|
|
|
|
Are you using the nested Master Pages? In this case, the simple way to figure out the way to get reference to the Label is to look at the control tree of the web page. You can simply set the Trace="true" in the Page directive or run your application in debug mode. When you see the control hierarchy, you will see that you need to first get reference to the PlaceHolderControl placed in the Main MasterPage, then keep using the FindControl method to access the Label control in the Sub MasterPage. Also you should remember that the Page_Load of the Master Page runs after the Page_Load of the content page, so the value you get in the content page is not what you assign in the Master Page.
|
|
|
|
|
This is such an easy question that I'm embarrassed to ask.
I have a css stylesheet and an asp.net page written in vb.net - how do I apply the stylesheet to the vb.net page ?
Is there a way that I can assign it at a project level so I dont have to set it for each page ?
Thanks, Digsy
|
|
|
|
|
You will have to put this in the <head> of each page:
<link href="Path To Your Style Sheet" rel="stylesheet" type="text/css" />
You could always use a MasterPage, but the style sheet in that, then have all your pages use the MasterPage. It is what they're for.
|
|
|
|
|
Also, you can just drag your stylesheet from solution explorer onto the designer and it puts the link in there automagically.
|
|
|
|
|
eggsovereasy wrote: You could always use a MasterPage, but the style sheet in that, then have all your pages use the MasterPage. It is what they're for.
Well, master pages can be used that way, but they are more about separating page content from site content.
Themes are made for applying style to pages. Create a theme, put the css file in the theme folder, and a link tag will automatically be added to the head of each page that uses the theme.
---
b { font-weight: normal; }
|
|
|
|
|
I would argue that a site's style and content go together and both fall under the purview of the MasterPage.
|
|
|
|
|
Hello,
I cannot see ASP.NET TAB in my IIS. I am running .NET 2.0 on Windows Server 2000. It is having IIS 5.0
Any clues?
- ashish
|
|
|
|
|
My experience is that the installation of the 2.0 framework, provided that IIS is already installed, will hook the IIS manager with the ASP.NET configuration tab. Are you certain 2.0 is installed on that server? (is it possible it is 1.1 instead?)
|
|
|
|
|
I have .NET 2.0 installed. I have also added .NET Management Extensions in MMC, but still I do not see the ASP.NET TAB.
Note: The server is Windows 2000 and IIS is 5.0
- ashish
|
|
|
|
|
comm.CommandText = "select distinct BrandID,Brand as PictureFileName" +
" and BrandID = @BrandID";
comm.Parameters.Add("@BrandID", BrandID);
SqlDataReader dr10 = comm.ExecuteReader();
CatName.Text = dr10;
dr10.Close();
the above code is SUPPOSS to query BrandID from the database table Brand and show it out in the label.
pls some one debug this i think it went wrong somewhere >.<
|
|
|
|
|
Your query doesn't appear to be valid SQL. I'd recommend checking this[^] quick reference on basic SQL syntax.
Hope that helps.
--Jesse
|
|
|
|
|
What is it that you are trying to do, really?
I have seldom seen a piece of code with so many errors...
Let's have a look at your code:
comm.CommandText = "select distinct BrandID,Brand as PictureFileName" +
" and BrandID = @BrandID";
Why are you using distinct? Can there more than one record with the same BrandId?
You have forgotten the keyword "from" before the table name.
You are creating the alias "PictureFileName" for the table, but you are not using this alias anywhere.
You have forgotten the "where" keyword.
You have the operator "and", as if you were trying to combine conditions, but you only have one condition.
If you fix the query so that it works, it's still pointless. There are only two different results that you can get from it; either the exact same value that you put in the parameter if there is a matching record in the database, or an empty result if there is no matching record.
comm.Parameters.Add("@BrandID", BrandID);
Looking good. You might consider to specify the data type of the parameter once you get it up and running, though, to save a round trip to the database.
SqlDataReader dr10 = comm.ExecuteReader();
Nothing wrong here.
CatName.Text = dr10;
You can't put the entire DataReader object in the label. You have to read a value from the DataReader, perhaps using the GetInt32 method.
Before you try to read anything from the DataReader, though, you have to call the Read method.
neodeaths wrote: dr10.Close();
Another correct line.
---
b { font-weight: normal; }
|
|
|
|
|
comm.CommandText = "select BrandID,Brand from Brand where BrandID = @BrandID";
comm.Parameters.Add("@BrandID", BrandID);
SqlDataReader dr10 = comm.ExecuteReader();
CatName.Text = dr10;
dr10.Close();
is this how it should be done?
|
|
|
|