|
Here is the solution to ur problem
function maximizePanel()
{
var screenHeight = window.screen.availHeight;
var screenWidth = window.screen.availWidth;
document.getElementById('<% =Panel1.ClientID %>').style.width = screenWidth - 10;
document.getElementById('<% =Panel1.ClientID %>').style.height = screenHeight - 10;
}
<body onload="maximizePanel()">
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px" BorderWidth="2">
</asp:Panel>
</div>
</form>
</body>
</html>
Tej Aj,
http://opexsolution.com/forum/
Fan of:
http://www.abtstudioz.com/
|
|
|
|
|
Hi experts,
Autocomplete can be done in 3 ways
1. 2.<asp:textbox runat="server" id="Textbox1" autocomplete="off">
3.Textbox1.Attributes.Add("autocomplete", "off");.
We can also set AutoCompleteType="disabled"
But i want to do this in whole application. Is it possible to put it in web.config or is there any other solutions for this.
|
|
|
|
|
Theoretically, you could write a Http Module that would add this. Basically, you would register for the PreSendRequestContent and PreRequestHandlerExecute events and modify the output content there.
|
|
|
|
|
You can also do this in a skin file.
1) Right click on your the root of your web project and select Add ASP.Net Folder -> Theme. Give it a name.
2) Right click on the new theme and select Add New Item -> Skin File
3) In your new .skin file add: <asp:textbox runat="server" autocomplete="off"></asp:textbox>
4) In web.config modify: <pages theme="Name of your theme in step 1">
That should get you rolling.
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Thanks a lot........
It works great....... one doubt..... will it have any impact(disadvantage)
|
|
|
|
|
I'm not aware of any draw backs to using skin files, other than having to manually override the skin for every textbox you want autocomplete enabled for (using txtWhatever.Attributes.Add("autocomplete", "on")).
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
Let's say I have a ListView with DataPager like this:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="List.ascx.cs" Inherits="Lnow.Applications.CompanyManagement.Gui.Clients.List" %>
<asp:ListView runat="server" ID="itemsList" ItemPlaceholderID="item">
<LayoutTemplate>
<table class="simpleList">
<thead>
<tr>
<td>
<asp:Literal runat="server" Text="[Id]" meta:resourcekey="Id" />
</td>
<td>
<asp:Literal runat="server" Text="[Name]" meta:resourcekey="Name" />
</td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2">
<asp:DataPager runat="server" ID="itemsPager" PagedControlID="itemsList" PageSize="5">
<Fields>
<asp:NumericPagerField />
</Fields>
</asp:DataPager>
</td>
</tr>
</tfoot>
<tbody>
<asp:PlaceHolder runat="server" ID="item" />
</tbody>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr class="row">
<td>
<%# DataBinder.Eval(Container.DataItem, "Id") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="row-alt">
<td>
<%# DataBinder.Eval(Container.DataItem, "Id") %>
</td>
<td>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</td>
</tr>
</AlternatingItemTemplate>
</asp:ListView>
Now I want to use DataPager to page search results. How do I do it?
I found two answers to this question, both have an issue I want to avoid:
1. Create method to support ListView's PagePropertiesChanging event.
2. Create method to support DataPager's PreRender event.
The issue, that I want to avoid is that both those methods require me to store collection of retrieved data somewhere. And I don't want to do it, cause I can't do it. Objects, that are bound don't have Serializable attribute, so I can't throw them into ViewState. Is there any other way to do this? Or do I have to create my own control for paging?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Hello, reviewing ASP.NET to handle printing of a worksheet.
Any suggestions as to what technology to use to handle it?
I had Crystal Reports in mind (have previous experience using it on Windows Forms) however in vs2010 and .net4 it seems to be in beta.
Any suggestions to handle this functionality? doesnt have to be a reporting tool.
Any help or tips are appreciated, thanks in advance!
|
|
|
|
|
Hi all,
I wonder if I can use some vb.net modules and c#.net modules in the same ASP.Net Application
If yes, how can i Merge between them? and if that possible, may you please give me a simple example.
Thanks
Abdullah Abdelhay
modified on Monday, October 11, 2010 8:05 AM
|
|
|
|
|
Yes sure, we can use some code written in VB and some in C# in same Asp.net application. But they must be in different files.
For that, you need to have vb and c# files in different folder in App_code folder.and you need to make the entry in web.config in CODESUBDIRECTORIES tag.
For details, Have a look
Click here
|
|
|
|
|
Hi,
Hope you have got the answer from Brij's Post.
I just wanted to share one of my article where I gave some good example of using this features with APP_CODE along with uses of others ASP.NET Folders
Beginner's Guide to ASP.NET Application Folder [^]
It may help you !
|
|
|
|
|
Hi,
Thank you for your answers that worked fine
but there are a small problem
When you create a C# project and create App_Code and add in it for example cscode & vbcode Classes
you can call vb classes in cs classes but not the opposite, if you try to call cs classes in vb classes that not work.
Why?
i hope that not a problem
another question: Can we apply it on windows form applications??
Thanks
Abdullah Abdelhay
|
|
|
|
|
Hi,
Thank you for your answers that worked fine
but there are a small problem
When you create a C# project and create App_Code and add in it for example cscode & vbcode Classes
you can call vb classes in cs classes but not the opposite, if you try to call cs classes in vb classes that not work.
Why?
i hope that not a problem
another question: Can we apply it on windows form applications??
Thanks
Abdullah Abdelhay
modified on Tuesday, October 12, 2010 6:35 AM
|
|
|
|
|
Is this an answer. You should post your reply to the user's post you need to reply and not yours.
He is not notified for your answer and would never know you asked him something unless, of course, he checks your answer.
You may consider changing the type of the post to question and adding a reply to the user's post.
..Go Green..
|
|
|
|
|
Hi all,
I have one query like in business logic layer of catch block i want to create log file for handling the exceptions and in UI layer i want to redirect to error.aspx page . how to do that ?
Regards
Rama
|
|
|
|
|
Make your method return a value which you can use to determine wether the business logic code succeeded or not
public bool DoSomething()
{
bool result = false;
try
{
result = true;
}
catch
{
result = false;
}
return result;
}
and then on your asp page check wether the function failed or not
if (DoSomething())
{
}
else
{
Respone.Redirect("Error.aspx");
}
|
|
|
|
|
|
|
Hi,
I want to populate Month like Nov-2010,Dec-2010 etc.. in DropDownList. It will show current financial year and so on....
Can any one help me regarding this.
Thanks...
|
|
|
|
|
I dont know, Might be some third party control can provide you month in this format. You your self can create the month like this and bind it to the dwopdown,
Or you can hardcode it in a file and bind it from there when require.
|
|
|
|
|
Thanks for reply. But, I don't want to hardcodeit. I simply want to read system date.
|
|
|
|
|
TRy like this in Database
select convert(varchar(3),datename(mm,getdate()),24) + '--' + convert(varchar(4),datename(yy,getdate()),24)
|
|
|
|
|
5
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi,
I have a gridview with Edit And Delete buttons.
Here is one of the columns:
<asp:TemplateField HeaderText="החל מ-">
<EditItemTemplate>
<asp:TextBox ID="txtStart" Width="150px" ReadOnly="true" BackColor="LightSteelBlue" runat="server" Text='<%# Bind("startHour") %>'></asp:TextBox></EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtStartNew" Width="150px" runat="server"></asp:TextBox></FooterTemplate>
<ItemTemplate>
<asp:Label ID="lblMStart" Width="150px" runat="server" Text='<%# Bind("startHour") %>'></asp:Label></ItemTemplate>
</asp:TemplateField>
I've set the TextBox in the EditItemTemplate to ReadOnly.
My Problem is-
that i want to change the property (ReadOnly) to False after i pressed on the Edit button if some cell has a value.
I've tried to do this in the RowEditing event -
TextBox txtStart = (TextBox)GridViewIpTab.Rows[e.RowIndex].FindControl("txtStart");
but i got "Object reference not set to an instance of an object".
Can some one please help me with this problem?
|
|
|
|
|
Have you debugged it?
I would more than likely handle this on the client-side with some JavaScript.
I know the language. I've read a book. - _Madmatt
|
|
|
|