|
|
what is problem of this code?
dont work in fire fox onlu
@font-face
{
font-family: 'B Yekan';
src: url('../../../DirFont/Yekan.eot?#') format('eot'),
url('../../../DirFont/Yekan.woff') format('woff'),
url('../../../DirFont/Yekan.ttf') format('truetype');
}
body
{
font-family:'B Yekan' ,BYekan,Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #666;
font-size: 12px;
line-height: 1.5em;
background-color: #eeeff3; background-repeat: repeat-x; background-position: top
}
|
|
|
|
|
I make a dedicated CSS file for each font, this is what I use and it works fine in all browsers, no complaints in 2 years.
@font-face {
font-family: 'beryliumRG';
src: url('/fonts/Berylium/berylium_rg-webfont.eot');
src: url('/fonts/Berylium/berylium_rg-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/Berylium/berylium_rg-webfont.woff') format('woff'),
url('/fonts/Berylium/berylium_rg-webfont.ttf') format('truetype'),
url('/fonts/Berylium/berylium_rg-webfont.svg#beryliumRG') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'beryliumRG_IT';
src: url('/fonts/Berylium/berylium_rg_it-webfont.eot');
src: url('/fonts/Berylium/berylium_rg_it-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/Berylium/berylium_rg_it-webfont.woff') format('woff'),
url('/fonts/Berylium/berylium_rg_it-webfont.ttf') format('truetype'),
url('/fonts/Berylium/berylium_rg_it-webfont.svg#beryliumRG_IT') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'berylium_BD';
src: url('/fonts/Berylium/berylium_bd-webfont.eot');
src: url('/fonts/Berylium/berylium_bd-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/Berylium/berylium_bd-webfont.woff') format('woff'),
url('/fonts/Berylium/berylium_bd-webfont.ttf') format('truetype'),
url('/fonts/Berylium/berylium_bd-webfont.svg#berylium_BD') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'beryliumBD_IT';
src: url('/fonts/Berylium/berylium_bd_it-webfont.eot');
src: url('/fonts/Berylium/berylium_bd_it-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/Berylium/berylium_bd_it-webfont.woff') format('woff'),
url('/fonts/Berylium/berylium_bd_it-webfont.ttf') format('truetype'),
url('/fonts/Berylium/berylium_bd_it-webfont.svg#beryliumBD_IT') format('svg');
font-weight: normal;
font-style: normal;
}
Then I use it in another CSS File
.txt_BeryliumRG
{
color: rgb(0,0,0);
font-family: "beryliumRG", Georgia, Serif;
font-size: 1.2em;
font-weight: normal;
text-indent: 0.25em;
text-align:justify;
}
modified 1-Sep-13 15:33pm.
|
|
|
|
|
I am interested..,
I normally get fonts as .ttf, do I also need them in .eot, .woff and .svg format? I read somewhere that all browsers support .ttf formats.
I remain joe!
|
|
|
|
|
You have to get all 4 versions of the font
eot
svg
ttf
woff
There's a font website that will convert fonts to all 4 formats and you can download the font package in a zip file.
[font squirrel^]
|
|
|
|
|
Two points to check:
- space in name of font-family "B Yekan" - I'd prefer "BYekan" instead.
- relative URL to the location: url('../../../DirFont/Yekan.ttf') format('truetype'); - I'd prefer an absolute URL instead: how do the browsers / the web server behave when you use too many "../"?
|
|
|
|
|
I am doing my final year fyp and want to add searchbox in my web application. Can anyone suggest me better way to do that ?
I have got database table tblVDC with 5000 data and I want to keep the search box in aspx page so that user can find the required data fast.
|
|
|
|
|
|
|
In my local machine in my web site. I have a url mapper http module in place which maps a url like
2013/09/pid/productname.html/webpagemethod to product.aspx/webpagemethod?id=pid&y=2013&m=09&name=productname
What I'm trying to do is invoking the webpage method via REST method. I have included ScriptHandlerModule in httpmodules section of the web.config file. The call to the webpage method from the javascript fails in my local machine with error saying "this method is not allowed" but succeeds when is run from the deployment machine. The only difference between the local and deployment machine is the former is IIS6 and the latter is IIS7.5 in integrated pipeline mode. Does anybody know the cause?
Should query string parameters be included in a REST request at all?
Thanks in advance
|
|
|
|
|
Setting ACE is very slow for folder with many files and subfolders. My folder has 35602 files and 648 subfolders and SetAccessControl method needs 30 minute to remove a user from this folder.
I am removing a user from the security tab of folder using following code.
DirectoryInfo dirInfo = new DirectoryInfo(folderPath); DirectorySecurity fSecurity = dirInfo.GetAccessControl(AccessControlSections.All); fSecurity = CanonicalizeDacl(fSecurity);
fSecurity.RemoveAccessRule(new FileSystemAccessRule(coworkerAccount, accessRight, AccessControlType.Allow));
dirInfo.SetAccessControl(fSecurity);
SetAccessControl method takes a long time when the folder having many files.
Mahendra
|
|
|
|
|
sumB wrote: SetAccessControl method takes a long time when the folder having many files. That is inevitable. Each file takes a finite amount of time, multiply that by 35602, plust the time taken to traverse 648 subdirectories, and you get a larger finite time.
Veni, vidi, abiit domum
|
|
|
|
|
Yes, I understand you concern but do we have any technique to overcome the time issue.
Mahendra
|
|
|
|
|
The typical way I was taught in my days as an administrator was to use groups for file access rights. All that would be needed to remove an account from accessing the files was to remove them from the group, which in itsself is a quite speedy process. There is also nothing preventing you from having just a single account in such a group. The group access rights can be removed by some background process then after the last account from the group has been removed.
Still, removing an account from that group will immeadiately keep that account from accessing the files.
Hope that will help you in the future.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Hi,
Which control is suitable for enter the topic details with image, urls and smiley options?
Can one one please help me?
Karteek Panakani
Junior Software Engineer
|
|
|
|
|
There's nothing built-in. You'll need to look at an HTML editor control[^] such as CKEditor[^] or TinyMCE[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Take a look at this,
Its a neat little tool..
http://cutesoft.net/ASP.NET%2BWYSIWYG%2BEditor/[^]
You also could google a few others too..
Forum software often uses third party controls like this for posting..
But, there they are just helpful.. you will have to code your own features but some of this little html editors sure will help.
=)
|
|
|
|
|
Hello,
I have a web app which uses a java Calandar control, de selected date is written to SQLserver, then on reloading the page the data is retrieved from sqlserver, and needs to set the value of the calendar input field:
This is the Sub to execute my java script:
Public Sub RunJS(ByVal Source As Page, ByVal Script As String)
Dim strscript As String = Script
If (Not Source.ClientScript.IsStartupScriptRegistered("clientScript")) Then
Source.ClientScript.RegisterStartupScript(Source.GetType(), "clientScript", strscript)
End If
End Sub
And I use the following code to call this sub:
Dim JavaString As String
Dim IJT As New IJssel
JavaString = " var elem = document.getElementById(""Text2"");elem.value = ""Boe"";"
JavaString = JavaString.Replace("Boe", PMDate.Text)
IJT.RunJS(Me.Page, JavaString)
JavaString = " var elem = document.getElementById(""Text1"");elem.value = ""Boe"";"
JavaString = JavaString.Replace("Boe", CmDate.Text)
IJT.RunJS(Me.Page, JavaString)
The strange thing is that the first field Text2 is filled, and the next Text1 remains empty.
I do execute this code after full pageload, and also checekd the variables CMdate.text and PMdate.text, they both have a Datevalue.
I allready regret Using a Java Calendar control, but had no choice since asp.net datepicker control is not able to be in a popup window.
I hope someone can hand me a solution ?
Thx
|
|
|
|
|
Javascript is not the same thing as Java. Based on your code, you are using a Javascript calendar control, not a Java calendar control.
You'll also need to specify where the IJssel class comes from, since it isn't a built-in class; which calendar control you're using; and what values are in PMDate.Text and CmDate.Text .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello Richard,
The ijssel class is my own Utilities class, in this class the RunJs() sub is located.
To make things more clear I have removed the Runjs sub from the IJsselclass,
I Use the following datetimepicker:
The PMdate.text contains "20130828"
The CMdate.text contains "20130827"
The code now looks like this:
Public Sub RunJS(ByVal Source As Page, ByVal Script As String)
Dim strscript As String = Script
If (Not Source.ClientScript.IsStartupScriptRegistered("clientScript")) Then
Source.ClientScript.RegisterStartupScript(Source.GetType(), "clientScript", strscript)
End If
End Sub
Protected Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
Dim JavaString As String
JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text2"");elem.value = ""Boe"";</script>"
JavaString = JavaString.Replace("Boe", PMDate.Text)
RunJS(Me.Page, JavaString)
JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text1"");elem.value = ""Boe"";</script>"
JavaString = JavaString.Replace("Boe", CmDate.Text)
RunJS(Me.Page, JavaString)
End Sub
The tekst input fields look like this :
<input id="Text2" name="Text2" type="text" size="25"><a href="javascript:NewCal('Text2','yyyymmdd')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date" runat="server"></a>
<input id="Text1" name="Text1" type="text" size="25"><a href="javascript:NewCal('Text1','yyyymmdd')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date" runat="server"></a>
Regards,
Henk
|
|
|
|
|
OK, the obvious problem is that you're using the same key for both scripts:
happysoul wrote: If (Not Source.ClientScript.IsStartupScriptRegistered("clientScript")) Then
Source.ClientScript.RegisterStartupScript(Source.GetType(), "clientScript", strscript)
End If
As a result, only the first script will be registered.
Try specifying a different key for each script:
Public Sub RunJS(ByVal Source As Page, ByVal Script As String, ByVal Key As String)
Dim strscript As String = Script
If (Not Source.ClientScript.IsStartupScriptRegistered(Key)) Then
Source.ClientScript.RegisterStartupScript(Source.GetType(), Key, strscript)
End If
End Sub
Protected Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
Dim JavaString As String
JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text2"");elem.value = ""Boe"";</script>"
JavaString = JavaString.Replace("Boe", PMDate.Text)
RunJS(Me.Page, JavaString, "clientScriptText2")
JavaString = "<script type=""text/javascript""> var elem = document.getElementById(""Text1"");elem.value = ""Boe"";</script>"
JavaString = JavaString.Replace("Boe", CmDate.Text)
RunJS(Me.Page, JavaString, "clientScriptText1")
End Sub
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello Richard,
Thank you very much, case solved.
Regards,
Henk.
|
|
|
|
|
My page has a model type of List<viewmodel>. I am looping through that list and generating a form for each item. The items are all available reports, some of which accept parameters, some don't. As such, I decided to build a form for each one and handle the parameter processing on the controller end.
Here is what the code looks like, sorta:
@foreach(ViewModels.ReportViewModel item in Model) {
<li @{if (i == 0) {<text>class="k-state-active"</text>}}>
<span @{if (i == 0) {<text>class="k-link k-state-selected"</text>}}>@item.name</span>
<div>
@using (Ajax.BeginForm("Queue","Reporting",options))
{
@Html.HiddenFor(t => item.id)
@Html.Hidden("id",item.id)
foreach(var parameter in item.parameters) {
<div style="padding: 5px">
@Html.Label(parameter.displayName)
</div>
<div style="padding:0px 0px 5px 5px">
@Html.EditorFor(p => parameter.name, "ECR")
</div>
}
<div style="padding-bottom:5px;width:300px">
<input type="submit" class="k-button k-button-icontext k-grid-select" style = "margin-left:255px;width:50px" id="submit" name="submit" value="Submit" />
</div>
}
</div>
</li>
i++;
}
And the controller code looks like this:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Queue(ReportViewModel vm)
{
ReportQueue item = new ReportQueue
{
reportId = vm.id,
userId = 2,
statusId = 0,
reportParams = null,
datestamp = DateTime.Now
};
_uw.ReportQueueRepository.Insert(item);
_uw.Save();
return RedirectToAction("Index", new { id = vm.claimId });
}
The rendered form markup looks ok (action: /Reporting/Queue) but it is not hitting the action on the controller but is actually making a mess. Firebug shows it trying to process an Ajax request for data (Which is expected as the parameter.name triggers an editor template) but it is appending /Queue onto the Ajax request.
What gives? Is this a method signature mismatch issue?
Cheers, --EA
|
|
|
|
|
Ok, I have been fighting with coming up with a solution here.
The problem I need to solve.
I have a list, lets just say for example...
a custom control.. contains a textbox a, and b.
Ok, I store this in a generic list... I can add more and more of these items in that list..
I need to move them up and down... and also hook in call backs..
I need to remember what items are in the list.. and their values on each post back.. I solved this by setting their ids and storing them in a viewstate.. and then re-creating them each time.. works great.. but can only happen in Page_Load and since that happens before click... + and - cannot manipulate the order of the list because its already rendered out and events are hooked so I cant move it.. out that I know of.
Now, I have wrote a ton of code... and I can get some of it working but due to life cycle hell.. Its not all working... so I am going back to the drawing board here and figured I would ask other developers for their opinions on a solution.
Need to stack dynamic controls with call backs and store their values across post backs.. users can add and remove.. and also order the controls in a list..
Any ideas on possible solutions to this issue in .net that maybe I did not think of ?
=)
|
|
|
|
|
Can you give us some idea on which portion of code/functionality is not working in your case ?
Thanks
-Amit Gajjar
|
|
|
|
|