|
Hi reader,
I need the code for "Export the Data from gridview to Excel".And on the Excel sheet the data's particular column should have backcolor and Font bold, like that.
Can anybody help me?
|
|
|
|
|
There are a lot of articles in CP that illustrates how to export to excel:
Export to Excel[^]
|
|
|
|
|
Hi,
I have a solution that contains 3 projects.
all of the projects use the same pictures so I put them in a directory at the same lavel of the solution.
when I try to access a picture I give the relative path ../pictures/picture1.jpg
but I got the following error "Cannot use a leading .. to exit above the top directory."
Please HELP!!
Thanks
|
|
|
|
|
Please try ~/ instead of ../.
Hope it will solve your problem
Cheers!!
Brij
|
|
|
|
|
it's doesn't work.I can't do this because it's not on the the same folder that the project.It's in the folder of the solution.
thanks.
|
|
|
|
|
lune12 wrote: I can't do this because it's not on the the same folder that the project.It's in the folder of the solution.
thanks.
Do you mean that it is not in your your virtual directory? If that is the case you have you have to use a VD for those images and use full http path to the image. for example http://localhost/ImageVD/image1.jpg
or
just copy that damn image to you VD
|
|
|
|
|
Hello,
please help me. How I can enable Assembly binding logging. I have VS2008 and SDK 6.1. I modify my registers - add HKLM\Software\Microsoft\Fusion!EnableLog and set 1. I have set Fusion Log Viewer to "Log all binds to disk" and custom directory. But it doesnt still work. On yellow-screen-of-death I see warn:
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Thanks for all comments
Bye
Marek from Czech
|
|
|
|
|
Hi All,
I have a valid xml loaded in to XmlDocument object. How can I retrieve values from it, can any body please help me in it if possible give me a small code snippet or any link.
<Parameter>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
<Value Name="Aleem" Length = "0" Type="System.String">0</Value>
</Parameter>
Thanks for the help,
Aleem Mohammad,
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
This One[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks a Lot friend.
NIIT technologies
abdul.aleem@niit-tech.com
|
|
|
|
|
if (var_bcard != "")
{
Response.ContentType = "plain/text";
Response.Write("Hello Profile" + " " + Request.Form["var_bcard"] + " ");
String counterFile11 = Server.MapPath("bcard.xml");
if (File.Exists(counterFile11))
{
File.Delete(counterFile11);
}
StreamWriter sw11 = File.CreateText(counterFile11);
sw11.WriteLine(var_bcard);
sw11.Close();
}
string command1 = "",key1="",id2="", id1 = "", name1 = "", title1 = "", company1 = "", resstreet1 = "", rescity1 = "", resstate1 = "", respostalcode1 = "", rescountry1 = "", officestreet1 = "", officecity1 = "", officestate1 = "", officepostalcode1 = "", officecountry = "", worktel1 = "", worktel2 = "", hometel1 = "", hometel2 = "", mobile1 = "", fax1 = "", email1 = "", website1 = "";
XmlDocument doc1 = new XmlDocument();
doc1.Load(MapPath("bcard.xml"));
XmlNodeList mykey = doc1.GetElementsByTagName("Command");
command1 = mykey.Item(0).InnerText;
XmlNodeList mykey1 = doc1.GetElementsByTagName("Key");
if (mykey1.Count > 0)
{
key1 = mykey1.Item(0).InnerText;
}
else
{
key1 = "";
}
XmlNodeList mykey2 = doc1.GetElementsByTagName("Id");
if (mykey2.Count > 0)
id1 = mykey2.Item(0).InnerText;
else
id1 = "";
XmlNodeList mykey3 = doc1.GetElementsByTagName("Name");
if (mykey2.Count > 0)
name1 = mykey3.Item(0).InnerText;
else
name1 = "";
XmlNodeList mykey4 = doc1.GetElementsByTagName("Title");
if (mykey4.Count > 0)
title1 = mykey4.Item(0).InnerText;
else
title1 = "";
XmlNodeList mykey5 = doc1.GetElementsByTagName("Company");
if (mykey5.Count > 0)
company1 = mykey5.Item(0).InnerText;
else
command1 = "";
XmlNodeList mykey6 = doc1.GetElementsByTagName("resStreet");
if (mykey6.Count > 0)
resstreet1 = mykey6.Item(0).InnerText;
else
resstreet1 = "";
XmlNodeList mykey7 = doc1.GetElementsByTagName("resCity");
if(mykey7.Count>0)
rescity1 = mykey7.Item(0).InnerText;
else
rescity1 = "";
XmlNodeList mykey8 = doc1.GetElementsByTagName("resState");
if (mykey8.Count > 0)
resstate1 = mykey8.Item(0).InnerText;
else
resstate1 = "";
XmlNodeList mykey9 = doc1.GetElementsByTagName("resPostalcode");
if (mykey9.Count > 0)
respostalcode1 = mykey9.Item(0).InnerText;
else
respostalcode1 = "";
XmlNodeList mykey10 = doc1.GetElementsByTagName("resCountry");
if (mykey10.Count > 0)
rescountry1 = mykey10.Item(0).InnerText;
else
rescountry1 = "";
XmlNodeList mykey11 = doc1.GetElementsByTagName("officeStreet");
if (mykey11.Count > 0)
officestreet1 = mykey11.Item(0).InnerText;
else
officestreet1 = "";
XmlNodeList mykey12 = doc1.GetElementsByTagName("officeCity");
if (mykey12.Count > 0)
officecity1 = mykey12.Item(0).InnerText;
else
officecity1 = "";
XmlNodeList mykey13 = doc1.GetElementsByTagName("officeState");
if (mykey13.Count > 0)
officestate1 = mykey13.Item(0).InnerText;
else
officestate1 = "";
XmlNodeList mykey14 = doc1.GetElementsByTagName("officePostalcode");
if (mykey14.Count > 0)
officepostalcode1 = mykey14.Item(0).InnerText;
else
officepostalcode1 = "";
XmlNodeList mykey15 = doc1.GetElementsByTagName("officeCountry");
if (mykey15.Count > 0)
officecountry = mykey15.Item(0).InnerText;
else
officecountry = "";
XmlNodeList mykey16 = doc1.GetElementsByTagName("workTel1");
if (mykey16.Count > 0)
worktel1 = mykey16.Item(0).InnerText;
else
worktel1 = "";
XmlNodeList mykey17 = doc1.GetElementsByTagName("workTel2");
if (mykey17.Count > 0)
worktel2 = mykey17.Item(0).InnerText;
else
worktel2 = "";
XmlNodeList mykey18 = doc1.GetElementsByTagName("homeTel1");
if (mykey18.Count > 0)
hometel1 = mykey18.Item(0).InnerText;
else
hometel2 = "";
XmlNodeList mykey19 = doc1.GetElementsByTagName("homeTel2");
if (mykey19.Count > 0)
hometel2 = mykey19.Item(0).InnerText;
else
hometel2 = "";
XmlNodeList mykey20 = doc1.GetElementsByTagName("Mobile");
if (mykey20.Count > 0)
mobile1 = mykey20.Item(0).InnerText;
else
mobile1 = "";
XmlNodeList mykey21 = doc1.GetElementsByTagName("Fax");
if (mykey21.Count > 0)
fax1 = mykey21.Item(0).InnerText;
else
fax1 = "";
XmlNodeList mykey22 = doc1.GetElementsByTagName("EMail");
if (mykey22.Count > 0)
email1 = mykey22.Item(0).InnerText;
else
email1 = "";
XmlNodeList mykey23 = doc1.GetElementsByTagName("Website");
if (mykey23.Count > 0)
website1 = mykey23.Item(0).InnerText;
else
website1 = "";
mine xml is
<root><command>Create</command><id>0</id><name>a</name><title>a</title><company>a</company><resstreet>a</resstreet><rescity>a</rescity><resstate></resstate><respostalcode></respostalcode><rescountry></rescountry><officestreet>a</officestreet><officecity></officecity><officestate>a</officestate><officepostalcode></officepostalcode><officecountry></officecountry><worktel1>1</worktel1><worktel2>1</worktel2><hometel1>1</hometel1><hometel2>1</hometel2><mobile>1</mobile><fax>1</fax><email>a</email><website>a</website></root>
i think its helpful for you.
I will do my best?
|
|
|
|
|
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
you two should start a forum and help each other.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
right, because forums are the magic cure for programmers that can't find their arse with two hands and a flashlight.
led mike
|
|
|
|
|
is it possible that in all browser or resolution our page show equally or good (any facility is provided by asp.net or not).
I will do my best?
|
|
|
|
|
AspDotNetUser wrote: is it possible that in all browser or resolution our page show equally or good (any facility is provided by asp.net or not).
It has nothing to do with ASP.Net or C#.
Instead of using fixed values for height, width etc; try to use that relative manner i.e. percentage.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i use % and table also but in different resolution page look different.
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
That's all there is, you just have to experiment with it.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hello,
We have an ASP.NET 2.0 applicaion [C# and oracle 10g]. We are facing the issue with the site slowness. This happens in a random manner. How can we check which methods might be causing this issue. Like : Database connection, Insertion in database or the actual code.
Can we set up some logs hence we can check the time consumed by each method on a page? Some thing like this
#1. Insertion in db method called : 11.45
#2. Insertion in db over called: 11:46
#3. Logic for ...caled: 11:55
This way we can find which peace is actually causing the issue. Please suggest.
Regards,
Pavas
|
|
|
|
|
Read this[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
So do you think I should place trace after each of the statement where I think application will be giving issues
Regards,
Pavas
|
|
|
|
|
Hi,
I have an Image and want to set the ImageUrl to an Image located under "C:\MyFiles\MyPictures\Picture1.gif".
I do:
<asp:Image ID="Image2" runat="server" Style="position: static" ImageUrl = "C:\MyFiles\MyPictures\Picture1.gif"/>
But I can't see the Image. any Idea?
Thanks.
|
|
|
|
|
lune12 wrote: ImageUrl = "C:\MyFiles\MyPictures\Picture1.gif"/
Use the relative path.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
can you please specify ... thanks.
why doesn't it work?
|
|
|
|
|
Add a new Folder to the root directory of your website called Images.
Then add the picture to that folder.
Then call the picture like this:
ImgURL="http://www.websitename.com/Images/Imagename.jpg";
or
ImgURL="http://localhost:port/Images/ImageName.jpg"; (For local testing)
Hope this helps.
|
|
|
|