|
any method to get font-family of string
|
|
|
|
|
meghamaharshi wrote: get
Did you check fontFamily in JavaScript?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
|
foreach (FontFamily ff in FontFamily.Families)
{
if (ff.IsStyleAvailable(FontStyle.Regular))
this.fontbox.Items.Add(ff.Name);
}
fontbox is a combobox here
*** Why EXPERTS behave like a fool ***
|
|
|
|
|
hi.......................
Apply css or write in style
bye......................
Best Regards,
Chetan Patel
|
|
|
|
|
HI,
I am assigning DataTable to gridview as a DataSource like:
DataTable dt=new DataTable();
dt=GetDataTable();
gridView1.DataSource=dt;
gridView1.DataBind();
I want works its reverce... I want to fill a DataTable from gridView DataSource when it is already bind with DataTable.
Like:
DataTable dt=new DataTable();
dt=(DataTable)gridView1.DataSource;
Is this possible?????
Naresh Patel
|
|
|
|
|
hi...........
u have to use view state to store data table
Bye..........
Best Regards,
Chetan Patel
|
|
|
|
|
Hi
I have a search page where a user enters a value in a textbox and then a query is executed to find this value in the database.
The problem I have is that there are two textboxes the user can enter into, a code search and a descriptions search
If the user enters a code that exisits in the dataabase but not a descruotion that matches that code it doesnt bring back any results,
is there a way to amend this so it does?
thanks
|
|
|
|
|
Yes, write your SQL so that it works the way you want it to.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How to open an acrobat image file in a same working window using Asp.net & how to disable all the short keys like saving or copying in opened file.
|
|
|
|
|
you can open a file in the same window by setting the target to _self
Disabling the short keys involves using some javascript, there are plenty of exmaple out there
http://www.arraystudio.com/as-workshop/disable-ctrl-n-and-other-ctrl-key-combinations-in-javascript.html
above might help you
|
|
|
|
|
maruthi wrote: how to disable all the short keys like saving or copying in opened file.
You can't
|
|
|
|
|
Yeah you can i think try this, found this code on the net
function noCopyKey(e) {
var forbiddenKeys = new Array('c','x','v');
var keyCode = (e.keyCode) ? e.keyCode : e.which;
var isCtrl;
if(window.event)
isCtrl = e.ctrlKey
else
isCtrl = (window.Event) ? ((e.modifiers & Event.CTRL_MASK) == Event.CTRL_MASK) : false;
if(isCtrl) {
for(i = 0; i < forbiddenKeys.length; i++) {
if(forbiddenKeys[i] == String.fromCharCode(keyCode).toLowerCase()) {
alert('This action has been restricted, for more information contact MJM');
return false;
}
}
}
return true;
}
|
|
|
|
|
I am not sure, but I don't think it will work. PDF is shown by the application installed on the client. So there is no chance AFAIK.
|
|
|
|
|
I don't think you can control PDF reader options from within ASP.NET.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hello,
I have a strange problem. First I want to justify my use of tables in ItemTemplate. I have pretty long rows that we wants to display in two rows, and the only way I could figure out how to do it was to use an ItemTemplate and specify how split the rows.
The problem is as the subject says, I can't update the gridview when I have a table in the gridview. It works fine it I use regular databounds or if I don't have the values in a template. Below is my aspx-file:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="Customer"
DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="Select" TypeName="CustomerList"
UpdateMethod="Update"></asp:ObjectDataSource>
</div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataSourceID="ObjectDataSource1" Style="z-index: 100; left: 25px; position: absolute;
top: 75px" Width="250px" DataKeyNames="Id" EnableViewState="False">
<Columns>
<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />
<asp:BoundField DataField="Id" ReadOnly="true" />
<asp:TemplateField>
<ItemTemplate>
<asp:Table ID="Table2" runat="server">
<asp:TableHeaderRow ID="TableHeaderRow1" runat="server">
<asp:TableHeaderCell ID="TableHeaderCell1" runat="server">
<h4>ID</h4>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow1" runat="server">
<asp:TableCell ID="TableCell1" runat="server">
<asp:Label ID="LabelId" runat="server" Text='<%#Eval("Id")%>' />
</asp:TableCell>
</asp:TableRow>
<asp:TableHeaderRow ID="TableHeaderRow2" runat="server">
<asp:TableHeaderCell ID="TableHeaderCell2" runat="server">
<h4>Name</h4>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow2" runat="server">
<asp:TableCell ID="TableCell2" runat="server">
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Name")%>' />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
<EditItemTemplate>
<asp:Table ID="Table1" runat="server">
<asp:TableHeaderRow ID="TableHeaderRow3" runat="server">
<asp:TableHeaderCell ID="TableHeaderCell3" runat="server">
<h4>ID</h4>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow3" runat="server">
<asp:TableCell ID="TableCell3" runat="server">
<asp:Label ID="LabelId2" runat="server" Text='<%#Eval("Id")%>' />
</asp:TableCell>
</asp:TableRow>
<asp:TableHeaderRow ID="TableHeaderRow4" runat="server">
<asp:TableHeaderCell ID="TableHeaderCell4" runat="server">
<h4>Name</h4>
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow ID="TableRow4" runat="server">
<asp:TableCell ID="TableCell4" runat="server">
<asp:TextBox ID="TextBoxName" runat="server" Text='<%#Bind("Name")%>' />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="ObjectDataSource2"
Height="50px" Style="z-index: 102; left: 325px; position: absolute; top: 80px"
Width="325px" DataKeyNames="Id">
<EmptyDataTemplate>
No Customer Selected
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="New"
Text="New" />
<br />
</EmptyDataTemplate>
<Fields>
<asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
<asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True" />
</Fields>
</asp:DetailsView>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" DataObjectTypeName="Customer"
DeleteMethod="Delete" InsertMethod="Insert" SelectMethod="SelectSingle" TypeName="CustomerList"
UpdateMethod="Update">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" DefaultValue="-1" Name="selectCustomerId"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</form>
</body>
</html>
Any help is appreciated!
Thanks,
--Tomas
|
|
|
|
|
Hello Experts
I am doing login page.In that on entering wrong password 5 times i have block that user.
Please can anyone help me in solving this issue
|
|
|
|
|
Set up a count to count how many times a user postbacks to the login page i.e. set a session that runs everytime a user tries to login.
Count the number of times they fail, when it hits 5 stop the user from loggin in.
You could do this by entering a number into a column next to the user's name, this number could expire after 24 hours and the user would be unblocked again
say if you need this explaining
|
|
|
|
|
where can i declare session.
if i declare in pageload it will get initialise each time
|
|
|
|
|
You can keep attempt count in session, check the count before each attempt.
|
|
|
|
|
Hi, I need to Convert HTML Page into PDF Document. Can anyone help me?
Best Regards,
Chetan Patel
|
|
|
|
|
http://www.codeproject.com/KB/showcase/TallComponents.aspx
http://www.html-to-pdf.net/
try these
|
|
|
|
|
There are no inbuilt methods available. You need to purchase some third party components.
|
|
|
|
|
|
i dont understand
Best Regards,
Chetan Patel
|
|
|
|