|
Hi I have a Menu on my aspx page with 9 menuitems.
A mUltiview aith 9 views is attached to this menu.
Now I need to give a different colour to each item in Menu.
the StaticMenuItemStyle is from a css.
Can U plz. tell me how I can change colour od menu items which are attached to Multiview.
Itz urgent.
|
|
|
|
|
If you want to change the color of a menu item, try the following workaround solution
string menuText = YourMenuId.Items[0].Text;
YourMenuId.Items[0].Text = "" + menuText + "";
you should have the following CSS style in your page
.style1
{
color: red;
}
|
|
|
|
|
Hi Ramesh,
Thanx.
I did try this code and even inserted the css in my css file..
doesn't seem to work....
I need to give different colours to 9 menuitems... totally baffled..
|
|
|
|
|
Sorry the HTML content was interprented in my previous post.
Try this.
string menuText = YourMenuId.Items[0].Text;
YourMenuId.Items[0].Text = "<span class='style1'>" + menuText + "<span>";
Put the following CSS style in your page
.style1
{
color: red;
}
</style>
|
|
|
|
|
hiii,
I like to generate the report using gridview.
In that report i am having EmpName,DependentName,RelationType,Email_id
what the matter is the gridview have to be in the style
EmpName DependentName RelationType Email_id
---------------------------------------------------------
John kamal father abc@dfg.com
-----------------------------------------------------------
Ashok Friend adg@sdf.com
-----------------------------------------------------------
Amit Friend adg@sdf.com
------------------------------------------------------------
In this way i have to get all the dependent names of the employees.
How i can make the style of gridview as above.
plz anyone help me in doin this...
Thanks in advance
|
|
|
|
|
hi,
there are lots of grid styles available in Auto Format. Check which style suits for you.
Padmanabhan
|
|
|
|
|
If you have a problem with griview design, Check this[^]
|
|
|
|
|
hii,
Not like that...
I want gridview in the format that john is the emp_name.
I want to get emp_name only in the first row of the gridview...
In the second row i should not get the empname have to move directly to
the dependent_name.
i.e in the second & third row the emp_name cell must be empty..
How i can get this..
plz help me
its very urgent
Thanks in advance
|
|
|
|
|
|
|
If you know how many cells to be merged then you could use this. But if you dont know how many cells to be merged, for example for an employee, no. of dependents will be differing.
So Declare a class global variable and in
GridView1_RowDataBound event, try this
if (str != e.Row.Cells[2].Text)
{
str = e.Row.Cells[2].Text;
}
else
{
e.Row.Cells[2].Text = "";
}
|
|
|
|
|
I need to put scroll bar in some region of my aspx page not on whole page.
I know it in HTML page, but I need to put in aspx page in asp.net.
Please reply me.
Thanks & regards,
Jay
|
|
|
|
|
Use ASP.NET Panel control to cover the region and set the ScrollBars property appropriately.
|
|
|
|
|
//you can use panel or div
//div
//panel
<asp:panel id="Panel1" scrollbars="Vertical" runat="server" style="OVERFLOW-Y: auto; overflow-x:hidden; HEIGHT:200PX; width:80%">
Padmanabhan
|
|
|
|
|
Hi,
you can do this by 3 ways:
1.Using Panel (Server Control)
2.using DIV Tag (HTML Tag)
3.using Iframe (HTMl Tag)
if you want to scroll in verticle/horizontol then you set height/width of above control
Farogh Haider
Web developer
|
|
|
|
|
Respected Sir
I Define One Usercontrol that Contains One AjaxCalendercontrol
And One TextBox in my Project I need Replacing The TextBox With Label then controltovalidate property is not working for label my task is replacing textbox with label please help me i wrote the following code
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DateAjax.ascx.cs" Inherits="dotnetcode_UserControls_DateAjaxl" %>
<%@ Register Assembly="Validators" Namespace="Sample.Web.UI.Compatibility" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<DIV class="divColLast">
<asp:TextBox ID="txt_Date" runat="server"></asp:TextBox><asp:ImageButton ID="ImgCalendar" runat="server" ImageUrl="~/dotnetcode/Images/Calendar_scheduleHS.png" CausesValidation="False" /><cc1:RequiredFieldValidator ID="Rfv" runat="server" ErrorMessage="<b>This Is Mandatory</b><br/>Please Select the Date" ControlToValidate="txt_Date" Display="None" SetFocusOnError="True"></cc1:RequiredFieldValidator>
<ajaxToolkit:calendarextender id="CE" runat="server" popupbuttonid="ImgCalendar" popupposition="Right"
targetcontrolid="txt_Date"></ajaxToolkit:calendarextender>
<ajaxToolkit:ValidatorCalloutExtender ID="VceRe" runat="server" TargetControlID="Rfv" HighlightCssClass="validatorCalloutHighlight">
</ajaxToolkit:ValidatorCalloutExtender></DIV>
|
|
|
|
|
Validation controls are used to validate input from users in a web page. Therefore it can be applied to user enterable/changeable fields like textbox, dropdownlist, listbox etc. But Label is a display field and the user cannot change the content of a lable directly. So you cannot use the validation control with Label.
|
|
|
|
|
A lot of places like to use automagic code to replace TextBoxes with labels in "read-only" view. The real magic is you can still submit changes to the labels if permissions have not been properly addressed. (And they usually aren't)
|
|
|
|
|
Hi,
I am new to asp.net,I would like to know whether my website hosted in the webserver affect other sites hosted in the same server?, I mean the resources used by the website is very high, Should i bother about the resource utilization by my site or it is the head ache of the Service Provider?
Plz help.
|
|
|
|
|
Subin Alex wrote: Should i bother about the resource utilization by my site or it is the head ache of the Service Provider?
As a best practice, you should try to minimize it.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
If your website uses more that allocated to you, say bandwidth. your users will get a message saying that the website has reached the limit and the site will be shutdown for 1-5 mins and going forward you will get a notice from your service provider.
|
|
|
|
|
Hi,
Just try to figure out first why is your website running high on resource? Just check whether is is because of any coding issue or not. If it is acoding issue then you have to optimize the code. Take help of latest web debugger tools which will tell you which particular web request is creating the resource crisis. If I would be in your place, then I would like to check it in the staging server or in the development server for performance before final release. If you are sure that it is running perfectly fine in your environment then probably you need to check the production server's system and hardware configuration. Then you can definitely ask the question to your service provider.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Hi,
yes, you can upload more than one application in same domain. But there should be exactly one webconfig file.
Farogh Haider
Web developer
|
|
|
|
|
Hi,
I am new to asp.net,I would like to know if a user enters his e-mailid in my form,
How to check whether it is fake or not?
Plz help.
|
|
|
|
|
Hi, I think you should definitely use a regular expression. A quick google search for "valid email regular expression" leads to a good example here: http://www.codetoad.com/asp_email_reg_exp.asp[^]
That source is in the older ASP (not .NET), but the function should still work.
--EDIT -- actually you'll need to change around the function a bit but you get the idea.
|
|
|
|