|
In the masterpage you will find the tag. Just add after tag and before tag.
IE:
|
|
|
|
|
Thanks for responding. But I didn't see the code. Can you write it again?
|
|
|
|
|
funny.
It is:
<body>< center >
Your code here
< /center ></body>
|
|
|
|
|
Thank you. I will try it.
|
|
|
|
|
in the treeview , at runtime , i want to change the font color of the treenode , in javascript , how should i do it , it is working very fine , in the server side, but this leads to postback.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
modified on Sunday, April 6, 2008 4:08 AM
|
|
|
|
|
You will need to handle the event in javascript and set the css for the element that paints the node.
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 )
|
|
|
|
|
Look at the page source and find out how tree-view is getting rendered. Get those elements using JS and set the style property.
|
|
|
|
|
Hi
I have a web user control that I create dynamically and then add it to a panel like this:
<br />
MatchingControl control = (MatchingControl)LoadControl("MatchingControl.ascx");<br />
Panel1.Controls.Add(control);
I can deal with the control with no problems before page post back, but when the page is posted back to the server (in response to a button) I can't get the control like this:
<br />
MatchingControl control = (MatchingControl) Panel1.Controls[0];
Any one knows how to do it?
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
The control is gone. You need to recreate it every postback, and you need to create it before page load if you want it to have viewstate.
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 )
|
|
|
|
|
hey guys
i have a drop down box in my page which contains list of countries
how can i programmatically select a certain item by it's value?
for example i lke to select USA by it's value US
here is a part of my drop down box code:
<asp:DropDownList ID="drpSettingsCountry" runat="server">
...
<asp:ListItem Value="UG">Uganda</asp:ListItem>
<asp:ListItem Value="UA">Ukraine</asp:ListItem>
<asp:ListItem Value="GB">United Kingdom</asp:ListItem>
<asp:ListItem Value="US">United States</asp:ListItem>
...
</asp:DropDownList>
thank you
|
|
|
|
|
drpSettingsCountry.SelectedValue = "US"
in your code behind.
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 )
|
|
|
|
|
Hi,
I have an existing custom control. I have added a new DropDownList control on it. I try to bind the data from to dropdownlist within an overriden CreateChildControls method thats been called on OnInIt event of custom control.
When I try to bind an datatable of <b>my typed data set</B>, it skips out of the CreateChildControls function at on line no. 4 of the following logic
1. director.DataAccess.PopulateDataSet();
2. ddlLocation = new DropDownList();
3. ddlLocation.ID = LocationID;
4. ddlLocation.DataSource = director.DataAccess.DataSet.WO_Location_List;
What might be the reason? Is some thing wrong with the dropdownlist control OR there is some issue with TypedDataset data for that dropdownlist?
Note: This databinding logic works absolutely fine with other dropdownlist controls on a different custom control
Regards,
Vipul Mehta
|
|
|
|
|
I think oninit is too early to databind to a control. Why are you doing it so early ?
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 )
|
|
|
|
|
Hi,
I got this sorted out. Infact the DataType of one field in my select query & the datatable did not matched. As soon as I fixed it out it started working as expected.
Regards,
Vipul Mehta
|
|
|
|
|
Im converting Datatable to excel like this way
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
string sep = "";
foreach (object column in Columns)
{
string[] value = column.ToString().Split(',');
Response.Write(sep + value[0]);
sep = "\t";
}
Response.Write("\n");
foreach (DataRow dr in dt1.Rows)
{
sep = "";
for (i = 1; i < dt1.Columns.Count; i++)
{
Response.Write(sep + dr[i].ToString());
sep = "\t";
}
Response.Write("\n");
}
Response.End();
it converting fine but i would like to format the excel how's that possible. Thanks in advance byee
|
|
|
|
|
Make a comma the seperator, Excel will hopefully open as a CSV
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 )
|
|
|
|
|
Create a CSSclass
and then add data with mso-number-format:....
in the css class.
More Info to be found here[^]
We style Date Fields with MSo-Number-Formatting via a static class
public static void styleDataTable(Table table)
{
foreach (TableRow row in table.Rows)
{
foreach (TableCell cell in row.Cells)
{
if (IsDate(cell.Text))
{
cell.CssClass = "tdDate";
cell.Width = Unit.Pixel(80);
}
}
}
}
In the DataTableToExcel Page we place in code behind:
Sesame.styleDataTable(htmlToExport);
(htmlToExport is a created Table based on the datatable)
|
|
|
|
|
thanks to both of you, i fixed the style by putting the data into html table and then wrote it in repose object, it was easy
thanks again
|
|
|
|
|
I have to send an email which should have company logo at top of the body and then some texts.
when i'm doing so at the receipent its not displaying any image at all
can anybody give me solution to this question asap......as its urgent
thanking u
Russel
|
|
|
|
|
do you understand what email is and how it works ? It's a text only format. Some mail programs can show HTML mail, but the image needs then to be on a public server in order to be visible.
How are you embedding it ?
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 have asp panel inside a div, and i have done drag and drop other images (eg house, tree,etc).
Now i need to save the asp panel as an image in the format .jpeg or .bmp
Does anyone have solution to my problem.
|
|
|
|
|
hi
i am using master page and want to use java script validation on its content page but it is not working
master page code
<script language="javascript" src="<%= Request.ApplicationPath %>/regrsitValidation.js"></script>
.js file coad
function fnsFieldValidation()
{
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
{
alert("Please Choose Category.");
document.getElementById("dd1_dep_fabric").focus();
return false;
}
}
and submit botton code
<asp:Button ID="Button1"
runat="server" Text="Save" OnClientClick="return fnsMakeFieldValidation('form1');" />
krishna veer singh
|
|
|
|
|
what is the errormessage?
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
if this is the exact code you are using, remove . after getElemenById
and ifyou are having the dropdownlist int he content page, it must be prefixed with something like "ctl00_" . use this name in getelementbyid functional call as object name...(check HTML source by right clicking in browser window and select view source....and then look for the name for the control there )
hope it helps
Ashish Sehajpal
|
|
|
|
|
no error is giving but that validation is not firing
krishna veer singh
|
|
|
|
|
what is the errormessage?
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
if this is the exact code you are using, remove . after getElemenById
and ifyou are having the dropdownlist int he content page, it must be prefixed with something like "ctl00_" . use this name in getelementbyid functional call as object name...(check HTML source by right clicking in browser window and select view source....and then look for the name for the control there )
hope it helps
cheers !
Ashish Sehajpal
|
|
|
|