|
I am calling this on clicking of logout. OR if I detect some invalid operation, I again call the same method which in having that statement.
- ashish
|
|
|
|
|
Hi,
Is it possible to color individual items of a DropDownList box in ASP.Net? I tried the Attributes collection, but it didnt worked. If there is any other way to do the same, i would be interested in knowing. ( even if it is in javascript no problem !)
I will elaborate what i actually want---
If i have some items in my DropDownList as---
ABC
XYZ
PQR
ASDFG
SDFKJ
These entries will be in some logical groups. Accordingly i want to color those entries with different back colors for items in one group--
For example, ABC, XYZ will go with back color = Red, PQR with back color = Blue, etc...
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
|
Hi Anant,
this is the code which solve your problem.
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
strConn="Data Source=localhost;uid=sa;pwd=;Initial Catalog=northwind";
mycn = new SqlConnection(strConn);
myda = new SqlDataAdapter ("Select * FROM CategoryTable ", mycn);
ds = new DataSet();
myda.Fill (ds,"Table");
DropDownList1.DataSource =ds.Tables [0] ;
DropDownList1.DataTextField =ds.Tables[0].Columns["CategoryName"].ColumnName.ToString();
DropDownList1.DataValueField =ds.Tables[0].Columns["CategoryId"].ColumnName.ToString();
DropDownList1.DataBind () ;
for (int i =0;i < DropDownList1.Items.Count ;i++ )
{
DropDownList1.Items[i].Attributes.Add("style", "color:" + ds.Tables[0].Rows[i]["CategoryColor"].ToString () );
}
}
}
Hope this will solve your problem.
please let me know if any problem arise
bye
|
|
|
|
|
Hi,
jitu gupta wrote: DropDownList1.Items[i].Attributes.Add("style", "color:" + ds.Tables[0].Rows[i]["CategoryColor"].ToString () );
Thats what i wanted. Thanks.
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Just a simple question. In asp.net 2.0 when adding javascript to a content place holder do I use the same method as I would with an .aspx page eg. add the script in between the head tags. Content place holders dont have head tags so just wondering. If anyone can clarify this for me please let me know.
|
|
|
|
|
Hi,
In the content place holder go with like this.
<asp:content id="Content1" contentplaceholderid="Cph1" runat="server">
your javascript
then your content details on the page
with regards
Satips
|
|
|
|
|
hello All,
I am working on server automation of PowerPoint through ASP.NET.After every few days I start getting error "Server Execution Failed. It comes in the line where I create the application object i.e.
PowerPoint.Application pptApp = new PowerPoint.ApplicationClass();
Can anybody explain me why is it happening? Till now everything was working properly and suddenly this error started coming up.
Last time when I encountered this error i had to get PowerPoint reinstalled on my server machine, after which error disappeared.
Please help!
Thanks,
Avanika
|
|
|
|
|
Hi all,
I need your help as I have a n-tier application in which under 1 solution there are a lot of projects some of them are web projects and having user controls and I want to share them among these all projects. How could I do it?
Please suggest me.
Smile
Regards,
Ashok Kumar.
With Regards,
Ashok Kumar.
|
|
|
|
|
|
Hi all,
I displayed images in datagrid, But I want to show only two images in grid if they are of height 180 otherwise 6 images of height 60.
I use pagesize 6 this will always shows 6 images without considering image size.
How can I do this.
Please help me .....it's urgent.
Regards,
Nagraj
|
|
|
|
|
Here i am doubtful that something can be done in the frontend part what i think is may if you can in the stored procedure that what are the size of the image then you can change the page size there and can get the required records only. But for all this i am not too sure.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I am developing an application in asp.net using c#.
In that ,I have audio file and i want to identify the words from that audio and I have to write it down.
Plz,Let me know if anybody have its answer.
Swapnil Bhavsar
S/W Developer,Pune
-- modified at 5:09 Thursday 31st August, 2006
|
|
|
|
|
If I understand you correctly you would like to extract the lyrics from a audio file.
Well I don't think that is possible with today's technology. But if it is then I assume that would be one expensive piece of software.
An ways what you are looking for is voice recognition so get some books on that subject if you would like to develop a application like this.
--------------------------------------------------------
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!
|
|
|
|
|
Can someone guide me how to develop HL7 compatible programs using VB/ASP .net ? What kind of client and server based programs have to be developed, anyone has any experience ? any websites/tutorials ?
thanks
anuj
|
|
|
|
|
Depends what you mean by HL7 compatible. If you are trying to write an app to convert your data into HL7 format and back then I would say don't even try. There are a few players on the market that have components to do this and since HL7 is a complex format I found it best to leave it up to them. Another considersation we faced was the legal issues of getting it wrong, this is patient data that deals with the healthcare. Leaving it up to the experts seemed to be the wise choice in limiting our exposure.
only two letters away from being an asset
|
|
|
|
|
DON'T CROSS POST
only two letters away from being an asset
|
|
|
|
|
As you're probably aware, the newer versions of Netscape allow you to view a page using the Internet Explorer ActiveX control, or using the Firefox engine. Since these two are the most common, and since we need to ensure Firefox compliance for our intranet app, I hit on the idea of using Netscape for testing, and toggling pages.
The only thing that I'm unsure of is just how "firefox compliant" the rendering in NS is - is what I see in NS a true representation of what I will see in FF (or for that matter, in IE)? Anyone have resources about this?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
MySelf is Gaurav.
I am totally new to ASP.NET. Basically I am a VB 6.0 Programmer. I would like to know why ASP.NET is being used and how the Virtual directory is being created and nmanaged for future use..
Thanking you...
GAURAV LAL
|
|
|
|
|
Hi Gaurav,
Im afraid your question is a bit vague, but to try to answer your question.
ASP.NET is used because it represents a number of advances in web development from its predecessor - ASP. Most significant is probably access to the entire .NET framework which cosists of a large number of ready-built "functionality" such as web services, FileIO & Security.
The second part of your question about virtual directories doesnt make much sense, but they are managed using IIS in a very similar way to older ASP. IIS has changed a bit in recent releases of windows.
You may also find it helpful to read the thread linked in my sig below, it will help you word your title/questions better!
|
|
|
|
|
please read the Chris Maunder message, put a title in proper manner. ex.
"ASP.Net Features" ....
|
|
|
|
|
For making virtual directory u first make new project by clicking file -new website in Visual Studio 1.1 or 2.0 which ever u r using.
Then type INETMGR in run which is available in start menu.
Then u find ur computer name.in sub menu of ur computer name web sites r their.and further going default web sites r their.
Click on Default web sites tree u find ur prj name that u gave in VS.
right click on project name.U find Properties menu.Click on property menu and then click on Create menu.and then apply.
This makes virtual directory.
Also called configuring ur project in IIS.
Any queries r invited.
kartik rathi
|
|
|
|
|
Please refrain from SMS speak, this is a forum not a mobile phone!
|
|
|
|
|
Hi All,
I have been facing problems with accessing/using my asp.net application.
If the user types the address e.g. 'http://localhost/test' of the application in the browser address field it all works fine. The problem comes when the user clicks on the same address 'http://localhost/test' in a hyperlink form and opens the application through it.
The sessions get all mixed up! The window becomes resizable where as i have fixed the window size(works in the typed url case). The application just starts acting very funny.
Can anyone tell me what could be causing this? and what could be its possible solution??
Thanks!!
Shades
|
|
|
|
|
Hi,
I am using ASP.NET and C# 2.0. I have the following piece of code in my gridview control:
<asp:TemplateField HeaderText="Action">
<ItemTemplate>
<a href='UpdateOrderItems.aspx?OrderID=<%# DataBinder.Eval(Container.DataItem, "ID") %>'>Insert / Update Items</a>
</ItemTemplate>
<HeaderStyle CssClass="GridViewHeader" />
<ItemStyle CssClass="GridViewCell" />
</asp:TemplateField>
Currently the text of the link is Insert / Update Items. I want to do a test on this, if the order has been placed, then I want the link text to display "View", and if it has not been placed, the display "Insert / Update Items". I have now I idea where to do this test?? In my C# class behind the .aspx file? The reson being because the gridview populates the rows and coloumn for you.
Please can someone advise.
Regards,
ma se
|
|
|
|