|
I would suggest a read of this article:
http://aspalliance.com/509[^]
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
|
|
|
|
|
Thank you for the link. But did not get solution for my problem.
But the acticle is very informative.
Regards,
Uma
|
|
|
|
|
hi ,
I m Using the master page and the content page in my application i m attaching both page's html. My problem is that when i was browsing this page in the IE 7 named PNTInformation at that time it was loaded perfectly but while i was using another tab in same window at that time this page was placing some blank space at the top at that point at where the content page is just started and the page was looking dull so pls give me the solution for that.
---Master Page HTML-----
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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>GCM Master</title>
<link href="Common/StyleSheet.css" type="text/css" rel="stylesheet" />
</head>
<body class="MasterTable" style="margin: 0px">
<form id="form1" runat="server">
<table border="0" style="width:100%; height:100%" >
<tr style="height:1%">
<td>
<table style="width:100%;height:100%">
<tr>
<td style="width:10%;font-family:Tahoma;font-size:20pt;text-align:left;">
CMMView™
</td>
<td style="width:65%;vertical-align:middle;text-align:center">
<asp:Label CssClass="NormalMenu" runat="server" ID="lblTitle" />
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</td>
<td style="width:25%;text-align:right;vertical-align:middle">
<table cellspacing="3">
<tr>
<td style="width: 54px">
<asp:LinkButton ID="lnkChangePassword" CssClass="NormalMenu" onMouseover="this.className='HighlightMenu'" onMouseout="this.className='NormalMenu'" runat="server" ForeColor="#666633">Password</asp:LinkButton>
</td>
<td>|</td>
<td>
<asp:LinkButton ID="lnkChangeDetail" runat="server" CssClass="NormalMenu" onMouseover="this.className='HighlightMenu'" onMouseout="this.className='NormalMenu'" ForeColor="#666633">My Profile</asp:LinkButton>
</td>
<td>|</td>
<td>
<asp:LinkButton ID="lnkLogout" runat="server" CssClass="NormalMenu" onMouseover="this.className='HighlightMenu'" onMouseout="this.className='NormalMenu'" ForeColor="#666633">Logout</asp:LinkButton>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr style="height:1%">
<td style="vertical-align:top;text-align:center">
<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;text-align:left" id="tblMenu" >
<tr>
<td id="TDLeft" align="center">
<asp:Panel ID="Panel1" runat="server" Width="100%">
<table style="width:100%;height:100%">
<tr>
<td>
<asp:Image ImageUrl="Images/Manage.gif" id="btnManage" runat="server" Width="155px" onmouseover="this.src='../Images/Manage_over.gif';document.getElementById('ctl00_tblManage').style.visibility='visible';" onmouseout="this.src='../Images/Manage.gif'" Visible="false" />
<cc1:HoverMenuExtender ID="hmeManage" runat="Server" PopupControlID="pnlManage" PopupPosition="Bottom" TargetControlID="btnManage" PopDelay="25" />
</td>
</tr>
</table>
</asp:Panel>
</td>
<td align="center">
<asp:Panel ID="Panel2" runat="server" Width="100%">
<table style="width:100%;height:100%">
<tr>
<td>
<asp:Image ImageUrl="Images/Communications.gif" id="btnNotes" runat="server" Width="155px" onmouseover="this.src='../Images/Communications_over.gif';document.getElementById('ctl00_tblNotes').style.visibility='visible';" onmouseout="this.src='../Images/Communications.gif'" style="cursor: hand" />
<cc1:HoverMenuExtender ID="hmeNotes" runat="Server" PopupControlID="pnlNotes" PopupPosition="Bottom" TargetControlID="btnNotes" PopDelay="25" />
</td>
</tr>
</table>
</asp:Panel>
</td>
<td align="center">
<asp:Panel ID="Panel4" runat="server" Width="100%">
<table style="width:100%;height:100%">
<tr>
<td>
<asp:Image ImageUrl="Images/StateP&TInformation.gif" id="btnStateInfo" runat="server" Width="193px" onmouseover="this.src='../Images/StateP&TInformation_over.gif';document.getElementById('ctl00_tblStateInfo').style.visibility='visible';" onmouseout="this.src='../Images/StateP&TInformation.gif'" style="cursor: hand" />
<cc1:HoverMenuExtender ID="hmeStateInfo" runat="Server" PopupControlID="pnlStateInfo" PopupPosition="Bottom" TargetControlID="btnStateInfo" PopDelay="25" />
</td>
</tr>
</table>
</asp:Panel>
</td>
<td align="center">
<asp:Panel ID="Panel3" runat="server" Width="100%">
<table style="width:100%;height:100%">
<tr>
<td>
<asp:Image ImageUrl="Images/ContactAdmin.gif" id="btnContactAdmin" runat="server" Width="155px" onmouseover="this.src='../Images/ContactAdmin_over.gif';document.getElementById('ctl00_tblContactAdmin').style.visibility='visible';" onmouseout="this.src='../Images/ContactAdmin.gif'" />
<cc1:HoverMenuExtender ID="hmeContactAdmin" runat="Server" PopupControlID="pnlContactAdmin" PopupPosition="Bottom" TargetControlID="btnContactAdmin" PopDelay="25" />
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</td>
</tr>
<tr style="height:96%">
<td style="width:90%;text-align:left;vertical-align:top;">
<div style="height:90%;overflow:auto">
<asp:contentplaceholder id="phMaster" runat="server"></asp:contentplaceholder>
</div>
</td>
</tr>
</table>
<asp:Panel ID="pnlManage" runat="server">
<asp:Table ID="tblManage" runat="server" CellPadding="0" CellSpacing="0" BorderWidth="1" BackColor="White" style="visibility:hidden" />
</asp:Panel>
<asp:Panel ID="pnlNotes" runat="server">
<asp:Table ID="tblNotes" runat="server" CellPadding="0" CellSpacing="0" BorderWidth="1" BackColor="White" style="visibility:hidden" />
</asp:Panel>
<asp:Panel ID="pnlStateInfo" runat="server">
<asp:Table ID="tblStateInfo" runat="server" CellPadding="0" CellSpacing="0" BorderWidth="1" BackColor="White" style="visibility:hidden" />
</asp:Panel>
<asp:Panel ID="pnlContactAdmin" runat="server">
<asp:Table ID="tblContactAdmin" runat="server" CellPadding="0" CellSpacing="0" BorderWidth="1" BackColor="White" style="visibility:hidden" />
</asp:Panel>
</form>
</body>
</html>
-----ContentPage PNTInformation----------
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PntInformation.aspx.vb" Inherits="StateInfo_PntInformation" title="CMMView : P & T Information" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phMaster" Runat="Server">
<table cellspacing="0" cellpadding="0" style="height:440px;text-align:center" width="100%" border="0" >
<tr style="height:5%">
<td class="FormHeader" colspan="3">P & T Information</td>
</tr>
<tr style="height:1%">
<td style="width:100%">
<hr class="Line"/>
</td>
</tr>
<tr style="height:2%">
<td style="width:100%">
</td>
</tr>
<tr style="height:89%">
<td style="width:100%;text-align:center;">
<div style="width:100%; height:100%;overflow:auto;text-align:center;" runat ="server">
<asp:datagrid id="dgPnTinfo" runat="server" Width="97%" BorderColor="Black"
AllowSorting="True" AutoGenerateColumns="False" HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False">
<SelectedItemStyle CssClass="TableCellSelected"></SelectedItemStyle>
<AlternatingItemStyle CssClass="TableCell"></AlternatingItemStyle>
<ItemStyle CssClass="TableCell"></ItemStyle>
<HeaderStyle CssClass="TableHeader"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="State Name" SortExpression="StateName">
<ItemStyle HorizontalAlign="Center" Width="10%" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<asp:HiddenField ID ="hdnPNTNo" runat ="server" Value ='<%# DataBinder.Eval(Container.DataItem,"PNTNo") %>' />
<asp:LinkButton id="lnbStateName" runat ="server" Text ='<%# DataBinder.Eval(Container.DataItem,"StateName")%>' CommandName="AddP&T" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"StateID").ToString + "~" + DataBinder.Eval(Container.DataItem,"StateCode").ToString %> '></asp:LinkButton>
</ItemTemplate>
<HeaderStyle Width="10%"/>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Meeting Date" SortExpression="MeetingDate">
<ItemStyle HorizontalAlign="Center" Width="15%" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
</ItemTemplate>
<HeaderStyle Width="15%"/>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Committee" SortExpression="StateCode">
<ItemStyle HorizontalAlign="Center" Width="25%" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
</ItemTemplate>
<HeaderStyle Width="25%"/>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="PDL" SortExpression="StateCode">
<ItemStyle HorizontalAlign="Center" Width="25%" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
</ItemTemplate>
<HeaderStyle Width="25%"/>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Comments" SortExpression="ExternalComment">
<ItemStyle HorizontalAlign="Center" Width="25%" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<asp:Label ID="lblExtComment" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem,"ExternalComment")%>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="25%"/>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
</div>
</td>
</tr>
<tr style="height:2%">
<td style="width:100%">
</td>
</tr>
<tr style="height:1%">
<td style="width:100%">
<hr class="Line"/>
</td>
</tr>
</table>
</asp:Content>
Hiren Dave
|
|
|
|
|
I believe the different tabs in the same IE window can share the same session state however a new IE window (other than launching via CTRL+N) would have a totally new session created.
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
|
|
|
|
|
I use gridview binding with contents of one table from oracle.It displays record in gridview well but i got problem while storing that record into another table in oracle.Remember my source for gridview and destination of store are different.So please help for that.My code like as...
DataTable dtlocal = new DataTable();
dtlocal = (DataTable)GridView1.DataSource;
dtlocal.TableName = "LOCAL";
ds.Tables.Add(dtlocal);
string qry = "INSERT INTO EMP1 VALUES(?,?,?,?)";
conn.Open();
OracleCommand ocmd = new OracleCommand(qry, conn);
foreach (DataRow dtr in ds.dtlocal["LOCAL"].Rows)
foreach (DataColumn dcl in ds.dtlocal["LOCAL"].Columns)
{
//assigning values for parameters
}
|
|
|
|
|
What is the error you are getting ?
|
|
|
|
|
Hi all
I am using asp.net , C# ( VS2005)
I fill dropdownlist using method defined in class on page load event it sucessfully fill the data in dropdownlist. as there is customer requirment to show different class of people in different color as well as tooltip of data. i succesffully managed to fill this with below shown code . but issue is when i fires other controls postback event. this dropdownlist loses its color as well as tooltip .
Please suggest how to maintain the style of dropdownlist.
code to fill dropdownlist
public void Fillemp(DropDownList ctrl, string procedurename, string conn, SqlCommand cmd)<br />
{ <br />
try<br />
{<br />
if (con == null)<br />
{<br />
this.openconnection(conn);<br />
this.con.Open();
}<br />
if (con.State == ConnectionState.Closed)<br />
{<br />
this.openconnection(conn);<br />
con.Open();<br />
}<br />
DataTable dtcompany = new DataTable();<br />
ctrl.Items.Clear();<br />
dtcompany = GetDataTable(procedurename, cmd);<br />
ctrl.Items.Add(new ListItem("Select One", "0"));<br />
ctrl.Items.Add(new ListItem("All" , "1"));<br />
ctrl.Items.Add(new ListItem("Self" , "2"));<br />
foreach (DataRow row in dtcompany.Rows)<br />
{<br />
ListItem item = new ListItem(row["emPname"].ToString(), row["er_emp_code"].ToString());<br />
item.Attributes.Add("title", row["empname"].ToString());<br />
int lvl = int.Parse(row["er_user_lvl"].ToString());<br />
switch(lvl)<br />
{<br />
case 8:<br />
<br />
item.Attributes.Add("style", "color:green");<br />
break;<br />
case 7:<br />
item.Attributes.Add("style", "color:blue"); <br />
break;<br />
case 6:<br />
item.Attributes.Add("style", "color:red"); <br />
break;<br />
case 5:<br />
item.Attributes.Add("style", "color:purple"); <br />
break;<br />
default :<br />
item.Attributes.Add("style", "color:BLACK"); <br />
break;<br />
<br />
}<br />
ctrl.Items.Add(item); <br />
<br />
<br />
<br />
}<br />
<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
}<br />
finally<br />
{<br />
if (con != null)<br />
{<br />
con.Close();<br />
}<br />
}<br />
}<br />
page load event where i fill the dropdownlist
if (!(IsPostBack)) <br />
{<br />
SqlCommand cmd = new SqlCommand();<br />
cmd.Parameters.AddWithValue("empcode", Membership.GetUser().UserName);<br />
Doctor dr = new Doctor();<br />
dr.Fillemp(Ddlzse, "SpGetPredecessor", "bbraunemisconnectstring", cmd);<br />
dr.FillctrlList1(Ddlsubdiv, "SPGETSUBDIV_GIVENEMP", "bbraunemisconnectstring", cmd, 0);<br />
<br />
<br />
}<br />
and dropdownlist is defined as
<br />
<TD id ="tdddlzsm" style="BORDER-BOTTOM: gray 1px solid; TEXT-ALIGN: left ; width: 490px;" align ="center" ><br />
<asp:DropDownList id="Ddlzse" runat="server" Width="480px" Font-Bold="False" Font-Size="9pt" Font-Names="Arial" AppendDataBoundItems="True" ></asp:DropDownList><br />
</TD><br />
<br />
regards
imran khan
|
|
|
|
|
I am a beginner.
I want to bind part of fields from DataTable to GridView.
data of the datatable from Three different "select".
How do?
Thanks.
|
|
|
|
|
public void binddata()
{
conn.Open();
OracleCommand cmd = new OracleCommand("SELECT * FROM EMP", conn);
OracleDataReader odr = cmd.ExecuteReader();
dt1.TableName = "FXD";
dt1.Load(odr);
ds.Tables.Add(dt1);
GridView1.DataSource = ds.Tables["FXD"];
GridView1.DataBind();
conn.Close();
}
in this way u can bind datatable to gridview..
|
|
|
|
|
I only need to show them one or two Columns.
|
|
|
|
|
Hi,
Use gridview BoundField like this:
<asp:gridview>
<columns>
<asp:boundfield>
AccessibleHeaderText="string"
ApplyFormatInEditMode="True|False"
ConvertEmptyStringToNull="True|False"
DataField="string"
DataFormatString="string"
FooterText="string"
HeaderImageUrl="uri"
HeaderText="string"
HtmlEncode="True|False"
InsertVisible="True|False"
NullDisplayText="string"
ReadOnly="True|False"
ShowHeader="True|False"
SortExpression="string" Visible="True|False></asp:boundfield></columns></asp:gridview>
Set BoundFields then bound grid view with your data table such as previous reply shown.
|
|
|
|
|
I need to create an output file (.txt), but I need to manipulate the data in that file. I need to add “hard-coded” values for specific scenarios, for example, value[15] needs to have a value in it but is “ “ in the output file because it doesn’t exist in the database. This needs to be automated because a user will click a download output file button and the file will ultimately be saved on their client machine. I assume anything can be done, but is there a good web site with examples of this that you could point me to? Thanks for any help you can give.
|
|
|
|
|
You just build your text in memory, then you use response.binarywrite and set the header so they get the file as a download.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
I am using the regular technique of using a 2nd TextBox on my page so when the user presses Enter key, it automatically invokes the Submit buttons click event - but its not working. I also want to send the focus to the textbox when a link is clicked that displays this whole panel. Here's my code:
<br />
<asp:Panel ID="pnlSearch" runat="server" CssClass="pnlsearch"><br />
<asp:Label ID="lblSearch" runat="server" Text="Station Name:" CssClass="lblsearch"<br />
TabIndex="0"></asp:Label><br />
<asp:TextBox ID="txtSearch" runat="server" CssClass="txtsearch" Width="190px" TabIndex="1"<br />
OnTextChanged="txtSearch_TextChanged"></asp:TextBox><br />
<asp:TextBox ID="TextBox1" runat="server" style="visibility:hidden;display:none;" /><br />
<asp:Button ID="btnSearch" runat="server" CssClass="btnsearch" Text="Search" Width="79px" <br />
TabIndex="2" OnClick="btnSearch_Click" /><br />
</asp:Panel><br />
protected void lnkSearch_Click(object sender, EventArgs e)<br />
{<br />
pnlSearch.Visible = !pnlSearch.Visible;<br />
if (pnlSearch.Visible == true)<br />
{<br />
txtSearch.Focus();<br />
}<br />
}<br />
protected void txtSearch_TextChanged(object sender, EventArgs e)<br />
{<br />
btnSearch.Focus();<br />
}<br />
Any help?
Thanks.
Ekjon
|
|
|
|
|
To use a button as the default button for a textbox or group or textboxes, get all the textboxes inside a panel and set the defaultbutton of the panel to the button you need as default
Alexei Rodriguez
|
|
|
|
|
Thanks Alexei for the TextBox tip. But how do I send the focus to the TextBox? Why the Focus() method doesn't work?
Regards
Ekjon
|
|
|
|
|
Set the defaultfocus of the form to the TextBox you want to receive focus
Form.DefaultFocus = "TextBoxName"
If you always want to set the focus to the same control, you can set this property during design time
Alexei Rodriguez
|
|
|
|
|
Hi,
I tried both Page.SetFocus(..) and Form.DefaultFocus = ..
They work fine, the problem is: I have a LinkButton that shows and hides the panel. The focus works if the panel is initially visible - then if the link is clicked to hide it, the focus doesn't come back when the panel is visible again.
On the other hand, if the panel is not initially visible - then the focus never works. Here's my code, the first one in the Page Load:
<br />
if (Page.IsPostBack)<br />
{<br />
if (pnlSearch.Visible == true)<br />
{<br />
Page.SetFocus(txtSearch);<br />
}<br />
}<br />
protected void lnkSearch_Click(object sender, EventArgs e)<br />
{<br />
pnlSearch.Visible = !pnlSearch.Visible;<br />
if (pnlSearch.Visible == true)<br />
{<br />
Page.SetFocus(txtSearch); <br />
}<br />
}
Part of the problem could be - I am using AJAX's UpdatePanel.
I am embarrassed to ask these trivial questions.
Ekjon
|
|
|
|
|
After creating the following menu I would like menuitem2 to be a sub menu of menuitem1. As the code is now both menu items are at the same level. How do I make menuitem2 a sub menu of menuitem1?
Dim menuitem1 As New MenuItem("Main topic")
Dim menuitem2 As New MenuItem(Sub topic")
Me.Menu1.Items.AddAt(0, menuitem1)
Me.Menu1.Items.AddAt(1, menuitem2)
|
|
|
|
|
Hi,
Do like this:
<br />
Dim menuitem1 As New MenuItem("Main topic")<br />
Dim menuitem2 As New MenuItem(Sub topic")<br />
<br />
menuitem1.ChildItems.Add(menuitem2)<br />
Me.Menu1.Items.AddAt(0, menuitem1)<br />
<br />
|
|
|
|
|
|
I am working on a project where I need to make a personality profiling application. Are there any examples out there that I can benefit from?
Like I need to ask several questions and somehow come up with a personality profile very similar to things seen on dating websites etc.
Also if there are any 3rd party components for personality profile then I can try to sell it to my boss (not sure if he will buy into that) it doesn’t hurt to try
Thanks.
|
|
|
|
|
Taurian110 wrote: Also if there are any 3rd party components for personality profile then I can try to sell it to my boss (not sure if he will buy into that) it doesn’t hurt to tr
Avoid posting official problems
Is Google working at your side ?
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Yes of course I googled it Haven't had any luck so far with .net components or examples, maybe I am not using the right keywords to search for it, who knows.
To me it’s more like a task for a Psychology student to come up with questions and answers and some formula to give a personality profile, its just funny to me that I am asked to do it lol.
But you would think it would be pretty trivial to have examples for stuff like that since its so common in community type websites.
|
|
|
|
|
Hi,
Due to various limitation i need to be able to change the format of dates in a SQl2005 db from DD/MM/YYYY to YYYY/MM/DD. Ideally this should be a stored proceedure.
Any help would as always be very greatfully received.
Thanks in advance.
Phill
|
|
|
|