Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by aic007

  1. I'm afraid not. We get this question often here. That's a setting that the browser handles. If you don't want printed pages to have that you could download the Firefox source code, find the printing part of the code, remove that text and the compile it.You can also provide the information in PDF format so all the people can download and print it.
    Allright. Thanks a lot for answering man. I have to ask a stupid question just to be sure. Is it possible to replace the footer url with static text?Regards
  2. Hi allI have written a custom print.css in order to get nice pages when the web application is printed. However, I have not managed to remove theb header and footer - the properties that has the title and "page 1 0f 2" on the top, and the url and date on the bottom of the page.Can this somehow be removed?Regards

  3. Hi allI have developed a web site in MOSS (Microsoft Office SharePoint Server) from scratch, with all custom masterpage and style sheet. Before writing a print.css, I wanted to see how my site looked like in print view, and to my big surprise, I saw content except header on top and the url adress at the bottom. I tried google, but did not find anything relevant. Any experience with that? Regards

  4. I've never created a vcf card before and have never seen the MIME type "text/x-vCard" either. However have you tried "utf-8" for the character set instead of "1252"?
    response.Clear();response.Charset = "utf-8";

    Yes, tried with both "utf-8", "8859-1" and "iso-8859-1". No luck :)
  5. Hi allI have written code to generate av vcf card when clicking on a button, but I have a small problem. The problem is that it cannot take norwegian letters like: Æ, Ø and Å. (Norwegian is a western European and Scandinavian language). If my name is Bjørn, it will show as Bjørn on the card. I have tried many different values on the "response.Charset=" in my code, but without success. I have also tried this without success as theese variables are read only: stringWrite.Encoding.BodyName = "iso-8859-1";stringWrite.Encoding.CodePage = "1252";stringWrite.Encoding.EncodingName = "Western European";htmlWrite.Encoding.EncodingName = "iso-8859-1";This is my code. Please let me know if you know how to fix my problem :)

     private void VCard(HttpResponse response)		{		   					nameFirst = result.Rows[0]["Fornavn"].ToString();			nameLast = result.Rows[0]["Etternavn"].ToString();					company = "Company Æ, Ø, Å";			uRL = "www.whatever.no";			profession = result.Rows[0]["Tittel"].ToString();			telephone = result.Rows[0]["Telefon]ToString();			mobile = result.Rows[0]["Mobil"].ToString();			streetName ="Nationaltheateret";			city = "1517 OSLO";			response.Clear();			response.Charset = "1252";						response.ContentType = "text/x-vCard";			//create a string writer			System.IO.StringWriter stringWrite = new System.IO.StringWriter();			//stringWrite.Encoding.BodyName = "iso-8859-1";			//stringWrite.Encoding.CodePage = "1252";			//stringWrite.Encoding.EncodingName = "Western European";			//create an htmltextwriter which uses the stringwriter			System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);			//htmlWrite.Encoding.EncodingName = "iso-8859-1";			//vCard Begin			stringWrite.WriteLine("BEGIN:VCARD");			stringWrite.WriteLine("VERSION:2.1");									//Name			stringWrite.WriteLine("N:" + nameFirst + ";" + nameLast);						//Full Name		  //  stringWrite.WriteLine("FN:" + nameFirst + " " + nameLast);						  stringWrite.WriteLine("FN:" +nameFirst + " " + nameLast);			//Organisation			stringWrite.WriteLine("ORG:" + company);						//URL			stringWrite.WriteLine("URL;WORK:" + uRL);						//Title			stringWrite.WriteLine("TITLE:" + nameTitle);						//Profession			stringWrite.WriteLine("ROLE:" + profession);						//Telephone			stringWrite.WriteLine("TEL;WORK;VOICE:" + telephone);						//Fax			stringWrite.WriteLine("TEL;WORK;FAX:" + fax);						//Mobile			stringWrite.WriteLine("TEL;CELL;VOICE:" + mobile);						//Email			stringWrite.WriteLine("EMAIL;PREF;INTERNET:" + email);						//Address			stringWrite.WriteLine("ADR;WORK;ENCODING=QUOTED-PRINTABLE:" + ";" +			office + ";" + addressTitle + "=0D" + streetName + ";" +			city + ";" + region + ";" + postCode + ";" +			country);			//Revision Date			//Not needed			//stringWrite.WriteLine("REV:" + DateTime.Today.Year.ToString() +			//vCard End			stringWrite.WriteLine("END:VCARD");			response.Write(stringWrite.ToString());						response.End();		}

  6. Hi Ricardo ZeaI am using display:none; I am not quite sure what you meant regarding .hide, but this is my whole print css.master{border:none;margin: 0px;}#LeftTd, #Row1, #Row2, #Row3, #Row4, #Row 5{display: none;}Any ideas? =)Regards

  7. Hi allI have written a print css, and it works fine, but I have this little problem. When I print a web site, another blank page is also printed. Any experiences with that, or any workarounds you know about?Regards.

  8. Hi Richardo.With flimmering I actually meant flicker\shimmer :-)1. The whole drop down menu - starting from the first "Bank og finans" to the last "Bank og finans" is flickering.2. Sorry. A typo. I meant blinks. When i move the mouse curser to any option in the drop down menu, it blinks\flickers 3. It's an intranet site.Basicly it get kind of invincible for some mili seconds.

  9. Hi allI have this little problem that my drop down menu starts flimmering when it drops over a .pdf - document. Like this19474171ws5ca7.jpgIt binks even more when I move the mouse curser on the other options in the drop down menu. The same problem for IE 6 as well as IE 7.In firefox it get's behind the .pdf document:98131964ci5.jpgI have tried to set z - index value to max in my css - class that controls the drop down menu, but to no use. Is there any other property that I can try?Regards.

  10. Hi allI have been trying to implement search on my master page by copying it from this web site:http://www.startsiden.no/distribusjon/I have put it inside a <td></td> on my masterpage, and I can see it, but nothing happen when i clikk the "Søk" (wich is search in english) button after having typed text in the search field. Anyone here that have done something similiar and know how it needs to be done? :-)I implement the search inside a <td></td>, like this:

    <td>			<div id="abcstartsiden"><div style="background:transparent	  url('http://www.startsiden.no/img/skin/default   /img/distribution/468x30.gif')	  no-repeat;width:468px;height:30px;position:	  <a href="http://www.startsiden.no" title="ABC Startsiden" style="display:block;	  position:absolute;top:0;left:385px;width:83px;height:30px;	  text-decoration:none"></a>   <form method="get" action="http://norge.abcsok.no/" style="margin:0;padding:0">	 <input type="text" name="q" size="20" style="position:absolute;top:6px;left:65px	  width:230px;font:11px Tahoma, Verdana, Arial, Helvetica, sans-serif" />	 <input type="image" src="http://www.startsiden.no/img/skin/default/img/sok_bg.gif"	 style="position:absolute;top:8px;left:305px;width:34px;height:20px;" />   </form></div></div>						</td>


  11. Order by company then name, and use the scripting language to figure out what the last company is that you saw, and if the current company is different then print the company name before you print the record.
    Hi, and thanks a lot for answeringIf i use this:Select name, phone, companyFrom ProfileDBOrder by companyThis will give me the comany on each line also. I need the company to be the header "header". Like this (here Partners and Administrators are company):Partnersname1 phonenumbername2 phonenumbername3 phonenumbername4 phonenumbername5 phonenumbername6 phonenumberAdministratorsname7 phonenumbername8 phonenumbername9 phonenumbername10 phonenumbername11 phonenumbername12 phonenumberMy code will give me this on each line:name, phone nr, company Is it possible to make the company the "header" and then list all users from the same company under it in pure sql?
  12. It looks like you're using .NET. Have you thought about a Repeater?
    <asp:Repeater ID="PhoneRepeater" runat="server"><HeaderTemplate>	<table cellspacing="0" cellpadding="0" border="0">		<thead>			<tr>				<th>Name</th>				<th>Phone Number</th>			</tr>		</thead>		<tbody></HeaderTemplate><ItemTemplate>			<tr>				<td><%# DataBinder.Eval(Container.DataItem, "Name") %></td>				<td><%# DataBinder.Eval(Container.DataItem, "PhoneNumber") %></td>			</tr></ItemTemplate><FooterTemplate>		</tbody>	</table></FooterTemplate></asp:Repeater>

    And then, in the codebehind:

    // If you have a DataTable ("myDataTable") which has Columns// named "Name" and "PhoneNumber", you can bind it directly to the RepeaterPhoneRepeater.DataSource = myDataTablePhoneRepeater.DataBind();

    Thanks alot for your input, mate. I have now managed to make it work. Yes, I am using .Net, but I have to make everything programatically, and can't use design view or asp code, because I am developing something called web parts for sharepoint.
  13. Hi.Could someone here help me making a query that shows result like this:Partnersname1 phonenumbername2 phonenumbername3 phonenumbername4 phonenumbername5 phonenumbername6 phonenumberAdministratorsname7 phonenumbername8 phonenumbername9 phonenumbername10 phonenumbername11 phonenumbername12 phonenumberThe part of showing the name and phone nr fields is not difficult, but having them grouped under company like above I don't know how to acheive.If you had 3 fields called name, phone and company - how would you write your query to acheive a result as above? :-)Regards.

  14. HiThansk for answering. I fixed it another way:tlfnrtlfnr = tlfnr.Replace(" ", string.Empty).Trim(); But then I have another problem also. I would be most thankful if you could help me out on this one When I get the result, my list looks like this;name, phone nr.Bjørn Borg, 1234Bjør Arne Pedersen, 3456Asfandyar Wali Khan Karzai bin Laden 2356but I want it to be like this:Bjørn Borg, ------------------------------------ 1234Bjør Arne Pedersen, ------------------------- 3456Asfandyar Wali Khan Karzai bin Laden ---2356Without the lines off course :)Any ideas how I can acheive that when i have this code:My code is:Table tbl = new Table(); TableCell cell = new TableCell(); cell.Text = e.Item.DataItem.ToString(); cell.Text = ((DataRowView)e.Item.DataItem)[0].ToString(); TableCell cell2 = new TableCell(); string tlfnr = ((DataRowView)e.Item.DataItem)[1].ToString(); tlfnrtlfnr = tlfnr.Replace(" ", string.Empty).Trim(); cell2.Text = (tlfnr.Length > 4) ? tlfnr.Substring(tlfnr.Length - 4) : ""; TableRow row = new TableRow(); row.Cells.Add(cell); row.Cells.Add(cell2); tbl.Rows.Add(row); e.Item.Controls.Add(tbl) I tried by using css - classes on the cells, but without succsess.Any ideas? :-)Regards

  15. HiI have a phone number field from sql that is shown in a ListView on the web, and has this format:555 555 55My requirement is to show the last 4 digits only. I use this code to show only the last four digits:string tlfnr = ((DataRowView)e.Item.DataItem)[1].ToString(); tlfnr = tlfnr.Trim(); cell2.Text = (tlfnr.Length > 4) ? tlfnr.Substring(tlfnr.Length - 4) : ""; The problem is that my code counts the blank space as a digit also. So my output is like this:5 55I want the ouput to be:5555Any ideas on how I can acheive that?Regards.

  16. Hi all.I am retreving data from SQL in a .NET C# application, and this works fine, but in some cases I get to much data that is unnecessary long and takes the whole width of the page displacing all other elements. So, I was wondering if anyone could tell me about a method which I can use to split up the string based on how many words I want the line to show before starting on a new line? This is how I get my data from SQL:addRow("History:", result.Rows[0]["HistorieFieldFromSQL"].ToString());Any tips for me? :-)

  • Create New...