Search Results

Search found 294 results on 12 pages for 'cssclass'.

Page 1/12 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • remove cssclass from one anchor and assign to another in jquery...

    - by Pandiya Chendur
    Here are my anchors, <a ID="lnkbtn0" class="page-numbers" href="#">1</a> <a ID="lnkbtn1" class="page-numbers" href="#">2</a> <a ID="lnkbtn2" class="page-numbers" href="#">3</a> <a ID="lnkbtn3" class="page-numbers" href="#">4</a> And my click function i am adding a cssclass to show that it is the current anchor $("a.page-numbers").click(function() { $(this).addClass('page-numbers current'); }); What happens is when i click the next anchor the same class has been added to the current and the previous anchor... What can be done to remove the cssclass page-numbers current and assign cssclass page-numbers to the previous/all other anchors without changing the current one....

    Read the article

  • CssClass and default images in ServerContol

    - by Jeff Dege
    I'm writing a ServerControl in ASP.NET 3.5, and I'm exposing CssClass, so the user can manipulate the visual appearance of the control. My problem is that I want to establish reasonable defaults, so that the user doesn't have to configure CSS unless he wants to change the defaults. My specific problem is that my control is emitting html divs, that need to display background images. I want the user to be able to specify a different image in CSS, but I want to display a default background image, and I can't make that work. The entire server control is emitted as a div, with a class name set to the value the user provided in CssClass. The div that needs the background image is enclosed within this outer div, with a class name of its own. I am currently setting the background image in CSS on the page that contains the control: <style type="text/css"> .cssClass .innerDiv { background-image: url("http://...."); } </style> With this the proper image is drawn. But if it's not there, no image is drawn. What I want is for the ServerControl to emit some CSS that will define these image urls, that would be over-ridden by any css that was added by the user, and for that default CSS to include URLs to images embedded in the ServerControl's assembly. And I'm not sure of how to do either. Nor, for that matter, am I sure this is the best approach. Any ideas?

    Read the article

  • CSS button not styling

    - by o-logn
    Hey, I must be missing something obvious, but can someone explain what I'm doing wrong with my CSS? I would like all buttons to have a certain format, except a few. I was expecting to use CssClass in order to override the few that should be different, but they all seem to use the standard one. My CSS: .btn { border:none; background-color:red; } input[type="submit"] { border: 2px solid black; background-color:green; } All the buttons take the second value (green background, with a border). However, I have this button: <asp:Button ID="btnAdd" CssClass="btn" runat="server" Text="Add" /> I was expecting this to have no border, and a red background, but it's the same as every other button. Any ideas what I'm doing wrong? Thanks

    Read the article

  • Change css class depending on label's text

    - by abatishchev
    I have asp:Table with number of asp:Label inside asp:FormView, it represents short stats info. I need to set Label.CssClass to "red" if it's text isn't "0". Currently I do this on FormView.DataBound event. But think that it's better to use JavaScript and probably jQuery. How can I do that?

    Read the article

  • How to style an asp.net menu with CSS

    - by md1337
    I'm in the process of styling an asp.net menu and I'm trying to understand the meaning of the StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass parameters. My understanding is that the styles defined with these parameters are applied as CSS classes to the relevant elements, whenever needed. So I created my menu as follows: <asp:Menu ID="NavigationMenu" DataSourceID="NavigationSiteMapDataSource" StaticMenuStyle-CssClass="StaticMenuStyle" StaticMenuItemStyle-CssClass="StaticMenuItemStyle" StaticSelectedStyle-CssClass="StaticSelectedStyle" StaticHoverStyle-CssClass="StaticHoverStyle" Orientation="Horizontal" MaximumDynamicDisplayLevels="0" runat="server"> </asp:Menu> It works for StaticMenuStyle-CssClass and StaticMenuStyle-CssClass (the classes are applied to the relevant elements), but StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass are not applied, regardless of the selected or hover status of an element. What am I supposed to do to make this work? Thanks.

    Read the article

  • Do I need to use any other attributes other than CssClassProperty to enabled design-time support?

    - by keith
    Hi, I'm trying to provide the same design-time support that the CssClass provides on some custom properties of a server control. The documentation suggests that decorating the property with the CssClassProperty is all that's required. [CssClassProperty] public string SomeOtherCssClass{get;set;} This has no effect, in vs2008 or vs2010. I've looked at the WebControl class using reflector and implemented all the attributes, and every combination thereof, to my property and still no class dropdown. Some blog posts suggest that the use of the Editor attribute but a) there's not mention of it in the documentation and b) none of editors which are remotely related to css classes have any effect either. Am I missing something to enable this feature? Thanks in advance, Keith.

    Read the article

  • Access asp:CheckBox inner input from jQuery

    - by abatishchev
    I have a jQuery array acting on each control having corresponding class: function Foobar() { $('.foo').each(function() { // do something with $(this) } } I can access client-side controls like <input class="foo"> and server-side controls like asp:TextBox CassClass="foo"> But setting CssClass for asp:RadioButton doesn't make a sense. Here is generated code: <span class="foo"> <input type="radio" /> </span> How to set class for inner input or another way gather it using jQuery?

    Read the article

  • is there a rule in CSS that says class="one two" vs class="two one" and the second will override the

    - by Jian Lin
    Right now, there seems to be no such effect. Example: both divs are orange in color on Firefox <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <style> .one { border: 6px dashed green } .two { border: 6px dashed orange } </style> </head> <body> <div class="one two"> hello world </div> <div class="two one"> hello world </div>

    Read the article

  • SP Gridview link button column not working

    - by Dilse Naaz
    Hi I have one sharepoint custom page application which is rendering from a user control. In the user control page, i had used SPGridview for displaying data. My first column is Title Column (link button column), when the user click on the link, then one popup window will open with corresponding data. But the problem is the link button is not working properly. But this application is working as fine in asp.net application. My code is shown below.. <asp:UpdatePanel runat="server" ID="UpdatePanel2"> <ContentTemplate> <SharePoint:SPGridView ID="dgApplicationBox" CellPadding="0" Height="100%" runat="server" ForeColor="Black" Font-Size="10px" Font-Names="Verdana" AutoGenerateColumns="False" AllowPaging="True" Width="100%" BorderStyle="None" BorderWidth="0px" PageSize="10" BorderColor="White" BackColor="White" OnRowDataBound="dgApplicationBox_RowDataBound" DataKeyNames="ApplicationID" OnSelectedIndexChanged="dgApplicationBox_SelectedIndexChanged" OnPageIndexChanging="dgApplicationBox_PageIndexChanging" CssClass="ms-listviewtable" AlternatingRowStyle-CssClass="ms-alternating"> <SelectedRowStyle Font-Bold="True" ForeColor="Black" BackColor="#CE5D5A"></SelectedRowStyle> <EditRowStyle Font-Size="10px" Font-Names="Verdana,Arial,Helvetica,sans-serif"></EditRowStyle> <HeaderStyle Font-Size="11px" Height="20px" Font-Bold="True" ForeColor="Black" BackColor="#E7E8EC"> </HeaderStyle> <PagerStyle HorizontalAlign="Center" ForeColor="#414E61" Font-Size="5px" Font-Names="arial" Height="10px" BackColor="#EBF3FF"></PagerStyle> <RowStyle /> <Columns> <asp:TemplateField HeaderText="Title" HeaderStyle-CssClass="ms-vb"> <ItemTemplate> <asp:LinkButton ID="lbtnSubject" Text='<%# Bind("UDF5") %>' runat="server" OnClick="lbtnSubject_Click"></asp:LinkButton> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> <asp:TemplateField HeaderText="Request No."> <ItemTemplate> <asp:Label ID="lblReqNo" Text='<%# Bind("UDF1") %>' runat="server" /> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> <asp:BoundField DataField="CreatedOn" HeaderText="Created On" DataFormatString="{0:MM/dd/yyyy}" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle CssClass="ms-vb2"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Name" HeaderText="Form Type" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle CssClass="ms-vb2"></ItemStyle> </asp:BoundField> <asp:TemplateField HeaderText="History"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="21px" CssClass="ms-vb2"> </ItemStyle> <ItemTemplate> <asp:LinkButton ID="lbtnView" runat="server" OnClick="lbtnView_Click" >View</asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Application Id" Visible="False"> <ItemTemplate> <asp:Label ID="lblApplicationId" runat="server" Text='<%# Bind("ApplicationId") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> </Columns> </SharePoint:SPGridView> </ContentTemplate> </asp:UpdatePanel> when the user click on the link button, this code will works.. try { clearSession(); Session["DigitalSignature"] = null; Button btnDetails = sender as Button; DataTable dt = (DataTable)dgApplicationBox.DataSource; GridViewRow gvRow = (GridViewRow)(sender as LinkButton).Parent.Parent; Session["AppId"] = ((Label)gvRow.FindControl("lblApplicationId")).Text; string subject = ((LinkButton)gvRow.FindControl("lbtnSubject")).Text; WFInfo objWFInfo = new WFInfo(); objWFInfo.InitWorkflowProperty(Convert.ToInt32(Session["AppId"].ToString()), Session["CurrentUser"].ToString()); Session["FormId"] = objWFInfo.FormID.ToString(); string strFilname = objWFInfo.GetFormName(objWFInfo.ApplicationCategoryID.ToString()); string WindowName = strFilname; strFilname += ".aspx"; Session["CategoryId"] = objWFInfo.ApplicationCategoryID.ToString(); //pnlSubmitModal_ModalPopupExtender.Show(); ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "popUpWindow('" + strFilname + "?tittle=" + subject + "', 800, 690,'" + WindowName + "');", true); this.Controls.Add(new LiteralControl("<script>alert('hi');</script>")); if (Session["CurrentUser"] != null) { ApplicationForm objApplication = new ApplicationForm(); objApplication.markRead(Convert.ToInt32(Session["AppId"].ToString()), Session["CurrentUser"].ToString()); } bindFolderData(); } If i click on the link button, there will be only post back occuring. but not the popup window open.. Please help me for resolving this problem. thanks in advance..

    Read the article

  • Gridview header issue: call event on header

    - by Joris
    Now I got this gridview, And I need the headers to be clickable, whereafter an event starts (something like OnClickHeader="header_ClickEvent"?) Ofcourse there is a SortExpression element, which enables to sort the grid, but I want to be able to start any event, like when clicking a button. I could not find any solution within the asp:BoundField nor asp:TemplateField... I thought a hyperlink could solve the problem, but that was a bit premature. Also, when using a TemplateField, I find it very hard to fill the column with data. Could anyone bring me the solution? The Gridview: <asp:GridView CssClass="gridview" ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Student_key" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" PagerSettings-Visible="false" PageSize="14"> <HeaderStyle CssClass="headerstyle" /> <RowStyle CssClass="rowstyle"/> <AlternatingRowStyle CssClass="altrowstyle" /> <Columns> <asp:BoundField DataField="Studentnumber" HeaderText="Studentnummer" > <HeaderStyle CssClass="header100" /> </asp:BoundField> <asp:BoundField DataField="Prefix" HeaderText="Voorletters" > <HeaderStyle CssClass="header75" /> </asp:BoundField> <asp:BoundField DataField="prename" HeaderText="Voornaam" SortExpression="Voornaam"> <HeaderStyle CssClass="header75" /> </asp:BoundField> <asp:BoundField DataField="nickname" HeaderText="Roepnaam" > <HeaderStyle CssClass="header100" /> </asp:BoundField> <asp:BoundField DataField="insertion" HeaderText="Tussenvoegsel" > <HeaderStyle CssClass="header100" /> </asp:BoundField> <asp:BoundField DataField="surname" HeaderText="Achternaam"> <HeaderStyle CssClass="header100" /> </asp:BoundField> <asp:CommandField SelectText="show results" ShowSelectButton="True" > <HeaderStyle CssClass="header100" /> </asp:CommandField> </Columns> <EmptyDataTemplate >There are no results shown, please try again.</EmptyDataTemplate> </asp:GridView>

    Read the article

  • A problem with the asp.net create user control

    - by Sir Psycho
    Hi, I've customised the asp.net login control and it seems to create new accounts fine, but if I duplicate the user id thats already registered or enter an email thats already used, the error messages arn't displaying. Its driving me crazy. The page just refreshes without showing an error. I've included the as instructed on the MSDN site but nothing. http://msdn.microsoft.com/en-us/library/ms178342.aspx <asp:CreateUserWizard ErrorMessageStyle-BorderColor="Azure" ID="CreateUserWizard1" runat="server" ContinueDestinationPageUrl="~/home.aspx"> <WizardSteps> <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"> <ContentTemplate> <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal> <div class="fieldLine"> <asp:Label ID="lblFirstName" runat="server" Text="First Name:" AssociatedControlID="tbxFirstName"></asp:Label> <asp:Label ID="lblLastName" runat="server" Text="Last Name:" AssociatedControlID="tbxLastName"></asp:Label> </div> <div class="fieldLine"> <asp:TextBox ID="tbxFirstName" runat="server"></asp:TextBox> <asp:TextBox ID="tbxLastName" runat="server"></asp:TextBox> </div> <asp:Label ID="lblEmail" runat="server" Text="Email:" AssociatedControlID="Email"></asp:Label> <asp:TextBox ID="Email" runat="server" CssClass="wideInput"></asp:TextBox><br /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="aspValidator" Display="Dynamic" ControlToValidate="Email" ErrorMessage="Required"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic" CssClass="aspValidator" ControlToValidate="Email" SetFocusOnError="true" ValidationExpression="^(?:[a-zA-Z0-9_'^&amp;/+-])+(?:\.(?:[a-zA-Z0-9_'^&amp;/+-])+)*@(?:(?:\[?(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\.){3}(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\]?)|(?:[a-zA-Z0-9-]+\.)+(?:[a-zA-Z]){2,}\.?)$" ErrorMessage="Email address not valid"></asp:RegularExpressionValidator> <asp:Label ID="lblEmailConfirm" runat="server" Text="Confirm Email Address:" AssociatedControlID="tbxEmailConfirm"></asp:Label> <asp:TextBox ID="tbxEmailConfirm" runat="server" CssClass="wideInput"></asp:TextBox><br /> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="aspValidator" Display="Dynamic" ControlToValidate="tbxEmailConfirm" ErrorMessage="Required"></asp:RequiredFieldValidator> <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic" CssClass="aspValidator" ControlToValidate="tbxEmailConfirm" SetFocusOnError="true" ValidationExpression="^(?:[a-zA-Z0-9_'^&amp;/+-])+(?:\.(?:[a-zA-Z0-9_'^&amp;/+-])+)*@(?:(?:\[?(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\.){3}(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\]?)|(?:[a-zA-Z0-9-]+\.)+(?:[a-zA-Z]){2,}\.?)$" ErrorMessage="Email address not valid"></asp:RegularExpressionValidator> <asp:CompareValidator ID="CompareValidator1" runat="server" Display="Dynamic" SetFocusOnError="true" CssClass="aspValidator" ControlToCompare="Email" ControlToValidate="tbxEmailConfirm" ErrorMessage="Email address' do not match"></asp:CompareValidator> <asp:Label ID="lblUsername" runat="server" Text="Username:" AssociatedControlID="UserName"></asp:Label> <asp:TextBox ID="UserName" runat="server" MaxLength="12"></asp:TextBox><br /> <asp:CustomValidator ID="CustomValidatorUserName" runat="server" Display="Dynamic" SetFocusOnError="true" CssClass="aspValidator" ValidateEmptyText="true" ControlToValidate="UserName" ErrorMessage="Username can be between 6 and 12 characters." ClientValidationFunction="ValidateLength" OnServerValidate="ValidateUserName"></asp:CustomValidator> <div class="fieldLine"> <asp:Label ID="lblPassword" runat="server" Text="Password:" AssociatedControlID="Password"></asp:Label> <asp:Label ID="lblPasswordConfirm" runat="server" Text="Confirm Password:" AssociatedControlID="ConfirmPassword" CssClass="confirmPassword"></asp:Label> </div> <div class="fieldLine"> <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox> <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox><br /> <asp:CustomValidator ID="CustomValidatorPassword" runat="server" Display="Dynamic" SetFocusOnError="true" CssClass="aspValidator" ControlToValidate="Password" ValidateEmptyText="true" ErrorMessage="Password can be between 6 and 12 characters" ClientValidationFunction="ValidateLength" OnServerValidate="ValidatePassword"></asp:CustomValidator> <asp:CustomValidator ID="CustomValidatorConfirmPassword" runat="server" Display="Dynamic" SetFocusOnError="true" CssClass="aspValidator" ControlToValidate="ConfirmPassword" ValidateEmptyText="true" ErrorMessage="Password can be between 6 and 12 characters" ClientValidationFunction="ValidateLength" OnServerValidate="ValidatePassword"></asp:CustomValidator> <asp:CompareValidator ID="CompareValidator2" runat="server" Enabled="false" Display="Dynamic" SetFocusOnError="true" CssClass="aspValidator" ControlToCompare="Password" ControlToValidate="ConfirmPassword" ErrorMessage="Passwords do not match"></asp:CompareValidator> </div> <asp:Label ID="lblCaptch" runat="server" Text="Captcha:" AssociatedControlID="imgCaptcha"></asp:Label> <div class="borderBlue" style="width:200px;"> <asp:Image ID="imgCaptcha" runat="server" ImageUrl="~/JpegImage.aspx" /><br /> </div> <asp:TextBox ID="tbxCaptcha" runat="server" CssClass="captchaText"></asp:TextBox> <asp:RequiredFieldValidator ControlToValidate="tbxCaptcha" CssClass="aspValidator" ID="RequiredFieldValidator3" runat="server" ErrorMessage="Required"></asp:RequiredFieldValidator> <asp:CustomValidator ID="CustomValidator1" ControlToValidate="tbxCaptcha" runat="server" OnServerValidate="ValidateCaptcha" ErrorMessage="Captcha incorrect"></asp:CustomValidator> </ContentTemplate> <CustomNavigationTemplate> <div style="float:left;"> <asp:Button ID="CreateUser" runat="server" Text="Register Now!" CausesValidation="true" CommandName="CreateUser" OnCommand="CreateUserClick" CssClass="registerButton" /> </div> </CustomNavigationTemplate> </asp:CreateUserWizardStep> <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"> <ContentTemplate> <table border="0" style="font-size: 100%; font-family: Verdana" id="TABLE1" > <tr> <td align="center" colspan="2" style="font-weight: bold; color: white; background-color: #5d7b9d; height: 18px;"> Complete</td> </tr> <tr> <td> Your account has been successfully created.<br /> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="Button1" PostBackUrl="~/home.aspx" runat="server" Text="Button" /> </td> </tr> </table> </ContentTemplate> </asp:CompleteWizardStep> </WizardSteps> </asp:CreateUserWizard>

    Read the article

  • SharePoint 2010 Sandboxed solution SPGridView

    - by Steve Clements
    If you didn’t know, you probably will soon, the SPGridView is not available in Sandboxed solutions. To be honest there doesn’t seem to be a great deal of information out there about the whys and what nots, basically its not part of the Sandbox SharePoint API. Of course the error message from SharePoint is about as useful as punch in the face… An unexpected error has been encountered in this Web Part.  Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action …that’s if you have debug=true set, if not the classic “This webpart cannot be added” !! Love that one! but will a little digging you should find something like this… [TypeLoadException: Could not load  type Microsoft.SharePoint.WebControls.SPGridView from assembly 'Microsoft.SharePoint, Version=14.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.]   Depending on what you want to do with the SPGridView, this may not help at all.  But I’m looking to inherit the theme of the site and style it accordingly. After spending a bit of time with Chrome’s FireBug I was able to get the required CSS classes.  I created my own class inheriting from GridView (note the lack of a preceding SP!) and simply set the styles in there. Inherit from the standard GridView public class PSGridView : GridView   Set the styles in the contructor… public PSGridView() {     this.CellPadding = 2;     this.CellSpacing = 0;     this.GridLines = GridLines.None;     this.CssClass = "ms-listviewtable";     this.Attributes.Add("style", "border-bottom-style: none; border-right-style: none; width: 100%; border-collapse: collapse; border-top-style: none; border-left-style: none;");       this.HeaderStyle.CssClass = "ms-viewheadertr";          this.RowStyle.CssClass = "ms-itmhover";     this.SelectedRowStyle.CssClass = "s4-itm-selected";     this.RowStyle.Height = new Unit(25); }   Then as you cant override the Columns property setter, a custom method to add the column and set the style… public PSGridView() {     this.CellPadding = 2;     this.CellSpacing = 0;     this.GridLines = GridLines.None;     this.CssClass = "ms-listviewtable";     this.Attributes.Add("style", "border-bottom-style: none; border-right-style: none; width: 100%; border-collapse: collapse; border-top-style: none; border-left-style: none;");       this.HeaderStyle.CssClass = "ms-viewheadertr";          this.RowStyle.CssClass = "ms-itmhover";     this.SelectedRowStyle.CssClass = "s4-itm-selected";     this.RowStyle.Height = new Unit(25); }   And that should be enough to get the nicely styled SPGridView without the need for the SPGridView, but seriously….get the SPGridView in the SandBox!!!   Technorati Tags: Sharepoint 2010,SPGridView,Sandbox Solutions,Sandbox Technorati Tags: Sharepoint 2010,SPGridView,Sandbox Solutions,Sandbox

    Read the article

  • Smarty Tag help [closed]

    - by ntechi
    I am using an engine, where for forums Vbulletin is used and for Other thiiings social engine 3 is used, This was done by some professionals In one of the page I am having popular tags(In Social Engine) Its too long I want shortened it, How can I do it? here is my code {* SHOW POPULAR TAGS START *} <tr> <td align="left" valign="top"><img src="images/spacer.gif" alt="" width="1" height="10" /></td> </tr> <tr> <td align="left" valign="top"><table width="220" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="12" align="left" valign="top"><img src="images/blog_belowtl.jpg" alt="" width="12" height="10" /></td> <td width="196" align="left" valign="top" background="images/blog_belowtbg.jpg"><img src="images/spacer.gif" width="1" height="10" /></td> <td width="12" align="right" valign="top"><img src="images/blog_belowtr.jpg" alt="" width="12" height="10" /></td> </tr> <tr> <td align="left" valign="top" background="images/blog_belowlbg.jpg" style="background-repeat: repeat-y;">&nbsp;</td> <td align="left" valign="top"><table width="196" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" > {*<div class="articletags" > {foreach from=$popular_tags item=poptag} <a class="tag{$poptag.class}" href="articles.php?tag={$poptag.name}">{$poptag.name}</a> {/foreach} </div>*} {foreach from=$popular_tags item=poptag} {if $poptag.count == '1' } {assign var=cssClass value='tahoma15_cloud'} {elseif $poptag.count == '2' } {assign var=cssClass value='tahoma12bold_cloud'} {elseif $poptag.count == '3'} {assign var=cssClass value='tahoma13bold_cloud'} {elseif $poptag.count == '4'} {assign var=cssClass value='tahoma14bold_cloud'} {elseif $poptag.count == '5'} {assign var=cssClass value='tahoma15_cloud'} {else} {assign var=cssClass value='tahoma18bold_cloud'} {/if} <span class="{$cssClass}"><a href="articles.php?tag={$poptag.name}" class="{$cssClass}">{$poptag.name}</a></span> {/foreach} </td> </tr> </table></td> <td align="left" valign="top" background="images/blog_belowrbg.jpg" style="background-repeat: repeat-y;">&nbsp;</td> </tr> <tr> <td align="left" valign="top"><img src="images/blog_belowbl.jpg" alt="" width="12" height="10" /></td> <td align="left" valign="top" background="images/blog_belowbbg.jpg"><img src="images/spacer.gif" alt="" width="1" height="10" /></td> <td align="right" valign="top"><img src="images/blog_belowbr.jpg" alt="" width="12" height="10" /></td> </tr> </table></td> </tr> {* SHOW POPULAR TAGS END *} You can check the lenght of this tag, on this link http://www.managementparadise.com/articles.php Currently it is displaying very long on the widget area I am new on this, so any help will be appreciated :)

    Read the article

  • How to populate a drop down list in Spring MVC

    - by GigaPr
    Hi, would like to populate a drop down list on a jsp page i have my page that looks like <form:form method="POST" action="addRss.htm" commandName="addNewRss" cssClass="addUserForm"> <div class="floatL"> <div class="padding5"> <div class="fieldContainer"> <strong>Title:</strong>&nbsp; </div> <form:errors path="title" cssClass="error"/> <form:input path="title" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Description:</strong>&nbsp; </div> <form:errors path="description" cssClass="error"/> <form:input path="description" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Language:</strong>&nbsp; </div> <form:errors path="language" cssClass="error"/> <form:select path="language" cssClass="textArea" /> </div> </div> <div class="floatR"> <div class="padding5"> <div class="fieldContainer"> <strong>Link:</strong>&nbsp; </div> <form:errors path="link" cssClass="error"/> <form:input path="link" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Url:</strong>&nbsp; </div> <form:errors path="url" cssClass="error"/> <form:input path="url" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Url</strong>&nbsp; </div> <form:errors path="url" cssClass="error"/> <form:input path="url" cssClass="textArea" /> </div> </div> <input type="submit" class="floatR" value="Add New Rss"> </form:form> and my controller public class AddRssController extends BaseController { private static final String[] LANGUAGES = { "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WV", "WI", "WY" }; public AddRssController() { setCommandClass(RSS.class); setCommandName("addNewRss"); } @Override protected Object formBackingObject(HttpServletRequest request) throws Exception { RSS rantForm = (RSS) super.formBackingObject(request); // rantForm.setVehicle(new Vehicle()); return rantForm; } @Override protected Map referenceData(HttpServletRequest request) throws Exception { Map referenceData = new HashMap(); referenceData.put("language", LANGUAGES); return referenceData; } @Override protected ModelAndView onSubmit(Object command, BindException bindException) throws Exception { RSS rss = (RSS) command; rssServiceImplementation.add(rss); return new ModelAndView(getSuccessView()); } } and my BaseController public class BaseController extends SimpleFormController implements Controller { public UserServiceImplementation userServiceImplementation; public UserServiceImplementation getUserServiceImplementation() { return userServiceImplementation; } public void setUserServiceImplementation(UserServiceImplementation userServiceImplementation) { this.userServiceImplementation = userServiceImplementation; } public RssServiceImplementation rssServiceImplementation; public RssServiceImplementation getRssServiceImplementation() { return rssServiceImplementation; } public void setRssServiceImplementation(RssServiceImplementation rssServiceImplementation) { this.rssServiceImplementation = rssServiceImplementation; } } But it doesn t work Any suggestion?

    Read the article

  • FCKEditor doesn't set Value property on postback!

    - by Shaul
    I'm using FCKEditor on my asp.net web page. It appears beautifully, and the editor looks really good on the front end. Only problem is, the .Value property is not being set on the postback. No matter what changes the user makes to the value of the control on the page, when I click "Submit", the .Value property remains blank. I have Googled for other solutions, and most of them are of the variety where there's some conflict with Ajax, such as this and this. My problem is not solved by these solutions; it's much more fundamental than that. I'm not doing anything to do with Ajax; I'm just a simple asp.net newbie with a simple web form, and the value property is not being set on postback, not in IE and not in FF. It appears that at least one other person has had this problem, but no solution yet. Any ideas? Thanks! New information: I tried this out on a "hello world" test web site - and the test web site works 100%. There is obviously a problem on my page, but I have no idea where to begin tracking this down. Here's the markup of my page, in case anyone can see anything obvious that my newbie eyes can't: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="EmailTemplateEditForm.aspx.vb" Inherits="EEI_App.EmailTemplateEditForm" %> <%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %> <!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>EEI - Email Template</title> <link rel="stylesheet" href="EEI.css"> <script language="javascript" id="jssembleWare" src="sembleWare.js"></script> <style type="text/css"> .style1 { height: 251px; } .style2 { width: 2%; height: 251px; } .style3 { height: 490px; } </style> </head> <body> <form id="form1" runat="server"> <%@ register src="header.ascx" tagname="header" tagprefix="uc1" %> <%@ register src="footer.ascx" tagname="footer" tagprefix="uc1" %> <uc1:header ID="header1" runat="server" /> <!-- main content area --> <div class="content"> <!-- title of the page --> <div class="boxheader"> Email Template </div> <div class="standardbox"> <!-- Start Page Main Contents--> <!-- error messages --> <div class="errorbox"> <asp:Label ID="lblError" CssClass="ErrorControlStyle" runat="server" EnableViewState="False" Width="100%"></asp:Label> </div> <table class="contenttable"> <tr> <td align="left" valign="top" class="style3"> <div class="actionbox"> <div class="navheadertitle"> Navigation</div> <ul> <li> <asp:LinkButton ID="btnSubmit" CssClass="LinkButtonStyle" runat="server">Submit</asp:LinkButton> </li> <li> <asp:LinkButton ID="btnCancel" CssClass="LinkButtonStyle" runat="server" CausesValidation="false">Cancel</asp:LinkButton> </li> </ul> </div> </td> <td align="left" valign="top" class="style3"> <p> </p> <table> <tr class="MCRSFieldRow"> <td class="MCRSFieldLabelCell"> <asp:Label ID="lblEmailTemplate_TemplateName" CssClass="LabelStyle" runat="server" Width="175">Template Name</asp:Label> </td> <td class="MCRSFieldEditCell"> <asp:TextBox ID="txtEmailTemplate_TemplateName" CssClass="TextBoxStyle" runat="server" Width="100%"></asp:TextBox> </td> <td class="MCRSFieldLabelCell"> <asp:Label ID="lblEmailTemplate_TemplateType" CssClass="LabelStyle" runat="server" Width="175">Template Type</asp:Label> </td> <td class="MCRSFieldEditCell"> <asp:RadioButtonList ID="rblEmailTemplate_TemplateType" CssClass="RadioButtonListStyle" runat="server" RepeatColumns="1" RepeatDirection="Horizontal" Width="135px"> <asp:ListItem Value="1">Cover Letter</asp:ListItem> <asp:ListItem Value="2">Email</asp:ListItem> </asp:RadioButtonList> </td> <td class="MCRSRowRightCell"> &nbsp; </td> </tr> <tr class="MCRSFieldRow"> <td class="MCRSFieldLabelCell"> Composition Date </td> <td class="MCRSFieldEditCell"> <asp:Label ID="lblEmailTemplate_CompositionDate" CssClass="ElementLabelStyle" runat="server" Width="175"></asp:Label> </td> <td class="MCRSFieldLabelCell"> Last Used Date </td> <td class="MCRSFieldEditCell"> <asp:Label ID="lblEmailTemplate_LastUsedDate" CssClass="ElementLabelStyle" runat="server" Width="175"></asp:Label> </td> <td class="MCRSRowRightCell"> &nbsp; </td> </tr> <tr class="MCRSFieldRow"> <td class="MCRSFieldLabelCell"> Composed By </td> <td class="MCRSFieldEditCell" colspan="3"> <asp:Label ID="lblPerson_FirstNames" CssClass="ElementLabelStyle" runat="server"></asp:Label> <asp:Label ID="lblPerson_LastName" CssClass="ElementLabelStyle" runat="server"></asp:Label> </td> <td class="MCRSRowRightCell"> &nbsp; </td> </tr> <tr class="MCRSFieldRow"> <td class="MCRSFieldLabelCell"> <asp:Label ID="lblEmailTemplate_Subject" CssClass="LabelStyle" runat="server" Width="175">Subject</asp:Label> </td> <td class="MCRSFieldEditCell" colspan="3"> <asp:TextBox ID="txtEmailTemplate_Subject" CssClass="TextBoxStyle" runat="server" Width="100%"></asp:TextBox> </td> <td class="MCRSRowRightCell"> &nbsp; </td> </tr> <tr class="MCRSFieldRow"> <td class="style1"> <asp:Label ID="lblEmailTemplate_Body" CssClass="LabelStyle" runat="server" Width="175">Body</asp:Label> </td> <td class="style1" colspan="3"> <FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" Height="500px"> </FCKeditorV2:FCKeditor> </td> <td class="style2"> &nbsp; </td> </tr> </table> </td> </tr> </table> </div> <p> <a class="InputButtonStyle" href="#_swTopOfPage">Top of Page</a> </p> </div> <uc1:footer ID="footer1" runat="server" /> <p> <asp:TextBox ID="txtEmailTemplate_Body" CssClass="TextAreaStyle" Rows="4" runat="server" Width="100%" Height="16px" Visible="False"></asp:TextBox> </p> </form> </body> </html>

    Read the article

  • asp.net external form loading into jquery dialog submit button issue

    - by Mark
    I am loading an external file 'contact_us.aspx' into a jquery dialog box. the external page contains a form. When the submit button is pressed it closes the dialog box and changes the page to contact_us.aspx. is my code correct or is there a different way of doing this. see my code below, thanks. This JS is in y masterpage: <script type="text/javascript"> $(document).ready(function() { var dialogOpts = { modal: true, bgiframe: true, autoOpen: false, height: 500, width: 500, open: function(type, data) { $(this).parent().appendTo(jQuery("form:first")); } } $("#genericContact").dialog(dialogOpts); //end dialog $('a.conactGeneric').click( function() { $("#genericContact").load("contact_us.aspx", [], function() { $("#genericContact").dialog("open"); } ); return false; } ); }); </script> The external file 'contact_us.aspx' which is loaded into the dialog box, when the link is clicked. <asp:Panel ID="pnlEnquiry" runat="server" DefaultButton="btn_Contact"> <asp:Label ID="lblError" CssClass="error" runat="server" Visible="false" Text=""></asp:Label> <div class="contact_element"> <label for="txtName">Your Name <span>*</span></label> <asp:TextBox CssClass="contact_field" ID="txtName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator CssClass="contact_error" ControlToValidate="txtName" Display="Dynamic" ValidationGroup="valContact" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter your name"></asp:RequiredFieldValidator> </div> <div class="contact_element"> <label for="txtName">Phone Number</label> <asp:TextBox CssClass="contact_field" ID="txtTel" runat="server"></asp:TextBox> <asp:RequiredFieldValidator CssClass="contact_error" ControlToValidate="txtTel" Display="Dynamic" ValidationGroup="valContact" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Enter your phone number"></asp:RequiredFieldValidator> </div> <div class="contact_element"> <label for="txtEmail">Your Email <span>*</span></label> <asp:TextBox CssClass="contact_field" ID="txtEmail" runat="server"></asp:TextBox> <asp:RequiredFieldValidator CssClass="contact_error" ControlToValidate="txtEmail" Display="Dynamic" ValidationGroup="valContact" ID="RequiredFieldValidator3" runat="server" ErrorMessage="Enter your email address"></asp:RequiredFieldValidator> </div> <div class="contact_element"> <label for="txtQuestion">Question <span>*</span></label> <asp:TextBox TextMode="MultiLine" CssClass="contact_question" ID="txtQuestion" runat="server"></asp:TextBox> <asp:RequiredFieldValidator CssClass="contact_error" ControlToValidate="txtQuestion" Display="Dynamic" ValidationGroup="valContact" ID="RequiredFieldValidator4" runat="server" ErrorMessage="Enter your question"></asp:RequiredFieldValidator> </div> <div class="contact_chkbox"> <asp:CheckBox ID="chkNews" runat="server" Checked="true" Text="Receive our monthly newsletter" EnableTheming="false" /> </div> <span class="mandatory">* Required Field</span> <asp:LinkButton ID="btn_Contact" ToolTip="Submit" CssClass="submit_btn" ValidationGroup="valContact" runat="server" OnClick="SignUp" ></asp:LinkButton> <asp:RegularExpressionValidator CssClass="contact_error" ID="RegularExpressionValidator1" runat="server" ValidationExpression=".*@.{2,}\..{2,}" Display="Dynamic" ValidationGroup="valContact" ControlToValidate="txtEmail" ErrorMessage="Invalid email format."></asp:RegularExpressionValidator> <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="valContact" ShowMessageBox=true ShowSummary=false runat="server" /> </asp:Panel> <asp:Panel ID="pnlThanks" runat="server" Visible="false"> <h1>Thank you!</h1> </asp:Panel> code behind file: protected void SignUp(object sender, EventArgs e) { SmtpMail.SmtpServer = "localhost"; MailMessage myMail = new MailMessage(); //String myToEmail = MyDB.getScalar("select setting_value from [Website.Settings]"); ; //myMail.To = myToEmail; myMail.To = "[email protected]"; myMail.From = "[email protected]"; //myMail.Bcc = "[email protected]"; myMail.Subject = "Enquiry from the Naturetrek Site"; StringBuilder myContent = new StringBuilder(); myContent.Append("Name : " + txtName.Text + "\r\n"); myContent.Append("Email: " + txtEmail.Text + "\r\n"); myContent.Append("Telephone: " + txtTel.Text + "\r\n"); myContent.Append("\r\nTheir Question: \r\n" + txtQuestion.Text + "\r\n"); if (chkNews.Checked != true) { myContent.Append("Subscribed to newsletter: No"); } else { myContent.Append("Subscribed to newsletter: Yes"); } myContent.Append("\r\n"); myMail.Body = myContent.ToString(); SmtpMail.Send(myMail); pnlEnquiry.Visible = false; pnlThanks.Visible = true; }

    Read the article

  • Infragistics UltraWebTab

    - by user354089
    Im using Infragistcs UltraWebTab. The code is shown below ` <div class="tab-content"> <asp:Panel ID="PnlGeneral" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab-list"> <tr> <td style="border-bottom-color: White"> <asp:Label ID="LblErrors" runat="server" CssClass="ErrorMessage1"></asp:Label> <asp:Label ID="LblSuccessMsg" runat="server" CssClass="SuccessMessage1"></asp:Label> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" width="100%" border="0" class="tab-list"> <tr> <th width="205" class="FormLabel1"> Campaign Name <span class="ErrorMessage">*</span> </th> <td width="80%"> <asp:TextBox ID="TxtCampaignName" runat="server" CssClass="TextBox1"></asp:TextBox> </td> </tr> <tr> <th width="205" class="FormLabel1"> CRM Name <span class="ErrorMessage">*</span> </th> <td width="80%"> <asp:TextBox ID="TxtCRMName" runat="server" CssClass="TextBox1"></asp:TextBox> </td> </tr> <tr> <th class="FormLabel1"> Campaign Type <span class="ErrorMessage">*</span> </th> <td> <asp:DropDownList ID="DDLCampaignType" runat="server" CssClass="TextBox1" AutoPostBack="true" Width="117px" OnSelectedIndexChanged="DDLCampaignType_SelectedIndexChanged"> </asp:DropDownList> </td> </tr> <tr visible="false" id="trCompanyRow" runat="server"> <th class="FormLabel1"> Company <span class="ErrorMessage">*</span> </th> <td> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="style2" style="border-bottom-color: White"> <asp:DropDownList ID="DDLCompany" runat="server" CssClass="TextBox1" Width="117px" OnSelectedIndexChanged="DDLCompany_SelectedIndexChanged"> </asp:DropDownList> </td> <td class="style3" style="border-bottom-color: White"> <asp:LinkButton ID="btnlnknewCompany" runat="server" Style="font-size: 100%;" Text="Add New" OnClick="btnlnknewCompany_Click"></asp:LinkButton> </td> <td style="border-bottom-color: White"> <table cellpadding="0" cellspacing="0" border="0" width="100%" id="tdNewComapny" visible="false" runat="server"> <tr> <td class="style4" style="border-bottom-color: White"> <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox> </td> <td style="border-bottom-color: White"> <asp:Button ID="btnCompanyAdd" runat="server" CssClass="btn1" Height="20px" Text="Add" Width="25%" OnClick="btnCompanyAdd_Click" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr id="trBannerImage" runat="server" visible="false"> <th class="FormLabel1"> Banner Image <span class="ErrorMessage">*</span> </th> <td> <asp:FileUpload ID="FileUploadBannerImage" runat="server" ToolTip="Add images for banner" /> </td> </tr> <tr> <th class="FormLabel1"> Start Date <span class="ErrorMessage">*</span> </th> <td> <asp:TextBox ID="TxtStartDate" runat="server" CssClass="TextBox1"></asp:TextBox><rjs:PopCalendar ID="CalStartDate" runat="server" Control="TxtStartDate" Format="dd mm yyyy" ShowErrorMessage="false" /> &nbsp;dd-mm-yyyy </td> </tr> <tr> <th class="FormLabel1"> End Date <span class="ErrorMessage">*</span> </th> <td> <asp:TextBox ID="TxtEndDate" runat="server" CssClass="TextBox1"></asp:TextBox><rjs:PopCalendar ID="CalEndDate" runat="server" Control="TxtEndDate" Format="dd mm yyyy" ShowErrorMessage="false" /> &nbsp;dd-mm-yyyy </td> </tr> <tr> <th class="FormLabel1"> Enabled? </th> <td> <asp:CheckBox ID="ChkEnabled" runat="server" /> </td> </tr> <tr style="border-bottom-color: White" id="tblVerificationFields" visible="false" runat="server"> <th style="border-bottom-color: White"> Company's Verification Fields </th> <td style="border-bottom-color: White"> <table border="0" cellspacing="0" cellpadding="0" class="tab-form" width="100%"> <tr> <td colspan="3" align="center"> <br /> <p> <label style="font-size: 14px; font-weight: bold; text-align: center;"> Select from existing verification fields below</label></p> </td> </tr> <tr> <td colspan="2"> <asp:Repeater ID="RptrVeriFieldsParamType" runat="server"> <HeaderTemplate> <table border="0" cellpadding="0" cellspacing="0" class="tab-grid" style="border: 0px"> <tr> <th> </th> <th> Field Name </th> <th> Type </th> <th> </th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td style="border-bottom-color: White"> <asp:CheckBox ID="RptrChkVeriFields" runat="server" /> </td> <td style="border-bottom-color: White"> <asp:Label ID="RptrFieldName" runat="server" Text='<%# Eval("FieldName") %>'> </asp:Label> </td> <td style="border-bottom-color: White"> <asp:Label ID="RptrParamterTypeName" runat="server" Text='<%# Eval("PARAMETERTYPENAME") %>'> </asp:Label> </td> <td> <asp:Label ID="RptrHdnFieldId" runat="server" Text='<%# Eval("FIELDID") %>' Visible="false"></asp:Label> </td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> </td> </tr> <tr> <td style="border-bottom-color: White"> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%" runat="server"> <tr> <td colspan="6" style="border-bottom-color: White" align="center"> <br /> <p> <label style="font-size: 14px; font-weight: bold; text-align: center; width: 100%;"> Or Add New verification field</label> </p> </td> </tr> <tr id="trVerifcationFields" runat="server" visible="false"> <th style="border-bottom-color: White" width="110px"> <strong>Verification Name</strong> </th> <td style="border-bottom-color: White" width="50px"> <asp:TextBox ID="TxtVeriField" runat="server"> </asp:TextBox> </td> <th style="border-bottom-color: White" width="100px"> <strong>Parameter Type</strong> </th> <td style="border-bottom-color: White" width="100px"> <asp:DropDownList ID="DDLParameterType" runat="server"> </asp:DropDownList> </td> <th> </th> <td align="left" style="border-bottom-color: White"> <asp:Button ID="BtnAddVeriField" runat="server" CssClass="btn1" Height="20px" Text="Add" OnClick="BtnAddVeriField_Click" Width="75%" /> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" width="100%" border="0" class="tab-list"> <tr align="right"> <td> </td> <td align="right" class="tab-list"> <asp:Button runat="server" ID="Next" Visible="true" Text="Next >" CssClass="btn" /> </td> </tr> </table> </td> </tr> </table> </asp:Panel> </div> </ContentTemplate> </igtab:Tab> <igtab:Tab Text="CRM Deals (Step-2)" Key="Tab2"> <ContentTemplate> <div style="clear: both"> </div> <div class="tab-content"> <asp:Panel ID="PnlCRMDeals" runat="server" ScrollBars="Vertical" Height="500px"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab-list"> <tr> <td> <asp:GridView ID="GridDeals" AutoGenerateColumns="False" runat="server" BorderStyle="none" BorderWidth="0" CellPadding="0" CellSpacing="0" GridLines="None" ShowFooter="false" HorizontalAlign="Left" CssClass="tab-grid" Width="100%"> <HeaderStyle CssClass="header" HorizontalAlign="Center" /> <PagerStyle CssClass="pager" /> <AlternatingRowStyle CssClass="odd" /> <Columns> <asp:TemplateField> <ItemStyle Width="5%" /> <ItemTemplate> <asp:CheckBox ID="ChkDeals" runat="server" Visible="true" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Deal Name"> <ItemStyle Width="25%" /> <ItemTemplate> <asp:Label ID="DealName" runat="server" Text='<%# Eval("DealName") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Name in CRM"> <ItemTemplate> <asp:Label ID="CRMDealName" runat="server" Text='<%# Eval("CRM_NAME") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Deal Code"> <ItemTemplate> <asp:Label ID="PartNum" runat="server" Text='<%# Eval("PARTNUM") %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> </table> </asp:Panel> </div> </ContentTemplate> </igtab:Tab> ` The problem im facing is after the "BtnAddVeriField" add button is clicked the Panel for the next tab gets displayed below the first tab's Panel. Furthermore, that Add button is not displayed as well.

    Read the article

  • 403 error after adding javascript to masterpage for sharepoint.

    - by Jeremy
    I am attempting to add highslide-with-html.js from http://highslide.com/ to my masterpage. I am receiving a 403 forbidden error when I use the provided masterpage. I have placed it in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033. Test javascript files such as pirate.js which consists solely of alert("Arr!"); have loaded from the same directory. I have provided the code for the masterpage. When I do not reference the problem javascript file there is no 403 error. <%@ Master language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %> <%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %> <%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %> <%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %> <%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %> <html dir="<%$Resources:wss, multipages_direction_dir_value %>" runat="server" __expr-val-dir="ltr"> <head runat="server"> <meta name="GENERATOR" content="Microsoft SharePoint"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Expires" content="0"> <SharePoint:RobotsMetaTag runat="server" __designer:Preview="" __designer:Values="&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl00' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <title id="onetidTitle"> <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/> </title> <Sharepoint:CssLink runat="server" __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/en-US/Core%20Styles/Band.css&quot;/&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/en-US/Core%20Styles/controls.css&quot;/&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/zz1_blue.css&quot;/&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/_layouts/1033/styles/core.css&quot;/&gt; " __designer:Values="&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl01' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <!--Styles used for positioning, font and spacing definitions--> <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/Band.css%>" runat="server" __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/en-US/Core%20Styles/Band.css&quot;/&gt; " __designer:Values="&lt;P N='Name' Bound='True' T='SPUrl:~SiteCollection/Style Library/~language/Core Styles/Band.css' /&gt;&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl02' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/controls.css %>" runat="server" __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/en-US/Core%20Styles/controls.css&quot;/&gt; " __designer:Values="&lt;P N='Name' Bound='True' T='SPUrl:~sitecollection/Style Library/~language/Core Styles/controls.css' /&gt;&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl03' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/zz1_blue.css%>" runat="server" __designer:Preview="&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/Style%20Library/zz1_blue.css&quot;/&gt; " __designer:Values="&lt;P N='Name' Bound='True' T='SPUrl:~SiteCollection/Style Library/zz1_blue.css' /&gt;&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl04' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <SharePoint:ScriptLink name="init.js" runat="server" __designer:Preview="&lt;script src=&quot;/_layouts/1033/init.js?rev=VhAxGc3rkK79RM90tibDzw%3D%3D&quot;&gt;&lt;/script&gt; " __designer:Values="&lt;P N='Name' T='init.js' /&gt;&lt;P N='InDesign' T='False' /&gt;&lt;P N='ID' T='ctl05' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <SharePoint:ScriptLink Name="highslide-with-html.js" runat="server" __designer:Error="Access to the path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\layouts\1033\highslide-with-html.js' is denied."/> <!--Placeholder for additional overrides--> <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/> </head> <body class="body" onload="javascript:_spBodyOnLoadWrapper();"> <WebPartPages:SPWebPartManager runat="server"/> <form runat="server" onsubmit="return _spFormOnSubmitWrapper();"> <table cellpadding="0" cellspacing="0" class="master"> <tr> <td height="100%" class="shadowLeft"> <div class="spacer"> </div> </td> <td valign="top"> <table cellpadding="0" cellspacing="0" width="100%" class="masterContent"> <tr style="height:0px"><td> <wssuc:DesignModeConsole id="IdDesignModeConsole" runat="server" __designer:Preview="&lt;span __designer:NonVisual=&quot;true&quot;&gt;[ DesignModeConsoleContainer &quot;DesignModeContainer&quot; ]&lt;/span&gt; " __designer:Values="&lt;P N='ID' ID='1' T='IdDesignModeConsole' /&gt;&lt;P N='TemplateControl' R='0' /&gt;"/></td></tr> <tr> <td colspan="2" class="authoringRegion"> <span class="siteActionMenu"> <PublishingSiteAction:SiteActionMenu runat="server" __designer:Preview=" &lt;!-- Begin Action Menu Markup --&gt; &lt;table height=100% class=&quot;ms-siteaction&quot; cellpadding=0 cellspacing=0&gt; &lt;tr&gt; &lt;td class=&quot;ms-siteactionsmenu&quot; id=&quot;siteactiontd&quot;&gt; &lt;span style=&quot;display:none&quot;&gt;&lt;menu type='ServerMenu' id=&quot;zz1_SiteActionsMenuMain&quot; largeIconMode=&quot;true&quot;&gt;&lt;ie:menuitem id=&quot;zz2_MenuItem_Create&quot; type=&quot;option&quot; iconSrc=&quot;/_layouts/images/Actionscreate.gif&quot; onMenuClick=&quot;window.location = '/_layouts/create.aspx';&quot; menuGroupId=&quot;100&quot;&gt;&lt;/ie:menuitem&gt;&lt;ie:menuitem id=&quot;zz3_MenuItem_Settings&quot; type=&quot;option&quot; iconSrc=&quot;/_layouts/images/ActionsSettings.gif&quot; onMenuClick=&quot;window.location = '/_layouts/settings.aspx';&quot; menuGroupId=&quot;100&quot;&gt;&lt;/ie:menuitem&gt;&lt;/menu&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span title=&quot;Open Menu&quot;&gt;&lt;div id=&quot;zz4_SiteActionsMenu_t&quot; class=&quot;&quot; onmouseover=&quot;MMU_PopMenuIfShowing(this);MMU_EcbTableMouseOverOut(this, true)&quot; hoverActive=&quot;ms-siteactionsmenuhover&quot; hoverInactive=&quot;&quot; onclick=&quot; MMU_Open(byid(''), MMU_GetMenuFromClientId('zz4_SiteActionsMenu'),event,false, null, 0);&quot; foa=&quot;MMU_GetMenuFromClientId('zz4_SiteActionsMenu')&quot; oncontextmenu=&quot;this.click(); return false;&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a id=&quot;zz4_SiteActionsMenu&quot; accesskey=&quot;/&quot; href=&quot;#&quot; onclick=&quot;javascript:return false;&quot; style=&quot;cursor:pointer;white-space:nowrap;&quot; onfocus=&quot;MMU_EcbLinkOnFocusBlur(byid(''), this, true);&quot; onkeydown=&quot;MMU_EcbLinkOnKeyDown(byid(''), MMU_GetMenuFromClientId('zz4_SiteActionsMenu'), event);&quot; onclick=&quot; MMU_Open(byid(''), MMU_GetMenuFromClientId('zz4_SiteActionsMenu'),event,false, null, 0);&quot; oncontextmenu=&quot;this.click(); return false;&quot; menuTokenValues=&quot;MENUCLIENTID=zz4_SiteActionsMenu,TEMPLATECLIENTID=zz1_SiteActionsMenuMain&quot; serverclientid=&quot;zz4_SiteActionsMenu&quot;&gt;Site Actions&lt;img src=&quot;/_layouts/images/blank.gif&quot; border=&quot;0&quot; alt=&quot;Use SHIFT+ENTER to open the menu (new window).&quot;/&gt;&lt;/a&gt;&lt;img align=&quot;absbottom&quot; src=&quot;/_layouts/images/whitearrow.gif&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;!-- End Action Menu Markup --&gt; " __designer:Values="&lt;P N='TemplateControl' R='0' /&gt;"/> </span> <div class="sharepointLogin"> <!--Authentication for Authors only--> <table cellpadding="0" cellspacing="0" > <tr> <td class="ms-globallinks"> <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server" __designer:Preview="&lt;span style='padding-left:3px'&gt;&lt;/span&gt; &lt;a id=&quot;ctl00_ctl09_hlMySite&quot; href=&quot;http://litwaredemo:80/MySite/_layouts/MySite.aspx&quot;&gt;My Site&lt;/a&gt; &lt;span style='padding-left:4px;padding-right:3px'&gt;|&lt;/span&gt; " __designer:Values="&lt;P N='ControlId' T='GlobalSiteLink1' /&gt;&lt;P N='Scope' T='Farm' /&gt;&lt;P N='ID' T='ctl08' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/></td> <td class="ms-globallinks"> <SharePoint:DelegateControl ControlId="GlobalSiteLink2" Scope="Farm" runat="server" __designer:Preview="&lt;span id=&quot;ctl00_ctl11_MyLinksMenu&quot;&gt;&lt;span style=&quot;display:none&quot;&gt;&lt;menu type='ServerMenu' id=&quot;ctl00_ctl11_MyLinksMenuMenuTemplate&quot; largeIconMode=&quot;true&quot;&gt;&lt;/menu&gt;&lt;/span&gt;&lt;span title=&quot;Open Menu&quot;&gt;&lt;span id=&quot;ctl00_ctl11_MyLinksMenuMenu_t&quot; class=&quot;ms-SPLink ms-hovercellinactive&quot; onmouseover=&quot;MMU_PopMenuIfShowing(this);MMU_EcbTableMouseOverOut(this, true)&quot; hoverActive=&quot;ms-SPLink ms-hovercellactive&quot; hoverInactive=&quot;ms-SPLink ms-hovercellinactive&quot; onclick=&quot;javascript:FetchCallbackMenuItems(&amp;#39;ctl00_ctl11_MyLinksMenuMenuTemplate&amp;#39;); MMU_Open(byid('ctl00_ctl11_MyLinksMenuMenuTemplate'), MMU_GetMenuFromClientId('ctl00_ctl11_MyLinksMenuMenu'),event,true, null, 0);&quot; foa=&quot;MMU_GetMenuFromClientId('ctl00_ctl11_MyLinksMenuMenu')&quot; oncontextmenu=&quot;this.click(); return false;&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a id=&quot;ctl00_ctl11_MyLinksMenuMenu&quot; accesskey=&quot;M&quot; href=&quot;#&quot; onclick=&quot;javascript:return false;&quot; style=&quot;cursor:pointer;white-space:nowrap;&quot; onfocus=&quot;MMU_EcbLinkOnFocusBlur(byid('ctl00_ctl11_MyLinksMenuMenuTemplate'), this, true);&quot; onkeydown=&quot;MMU_EcbLinkOnKeyDown(byid('ctl00_ctl11_MyLinksMenuMenuTemplate'), MMU_GetMenuFromClientId('ctl00_ctl11_MyLinksMenuMenu'), event);&quot; onclick=&quot;javascript:FetchCallbackMenuItems(&amp;#39;ctl00_ctl11_MyLinksMenuMenuTemplate&amp;#39;); MMU_Open(byid('ctl00_ctl11_MyLinksMenuMenuTemplate'), MMU_GetMenuFromClientId('ctl00_ctl11_MyLinksMenuMenu'),event,true, null, 0);&quot; oncontextmenu=&quot;this.click(); return false;&quot; menuTokenValues=&quot;MENUCLIENTID=ctl00_ctl11_MyLinksMenuMenu,TEMPLATECLIENTID=ctl00_ctl11_MyLinksMenuMenuTemplate&quot; serverclientid=&quot;ctl00_ctl11_MyLinksMenuMenu&quot;&gt;My Links&lt;img src=&quot;/_layouts/images/blank.gif&quot; border=&quot;0&quot; alt=&quot;Use SHIFT+ENTER to open the menu (new window).&quot;/&gt;&lt;/a&gt;&lt;img align=&quot;absbottom&quot; src=&quot;/_layouts/images/menudark.gif&quot; alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;|" __designer:Values="&lt;P N='ControlId' T='GlobalSiteLink2' /&gt;&lt;P N='Scope' T='Farm' /&gt;&lt;P N='ID' T='ctl10' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/></td> <td class="ms-globallinks"> <wssuc:Welcome id="explitLogout" runat="server" __designer:Preview=" &lt;span style=&quot;display:none&quot;&gt;&lt;menu type='ServerMenu' id=&quot;zz5_ID_PersonalActionMenu&quot; largeIconMode=&quot;true&quot;&gt;&lt;ie:menuitem id=&quot;zz6_ID_PersonalInformation&quot; type=&quot;option&quot; iconSrc=&quot;/_layouts/images/menuprofile.gif&quot; onMenuClick=&quot;javascript:GoToPage('\u002f_layouts\u002fuserdisp.aspx?Force=True\u0026ID=' + _spUserId);return false;&quot; menuGroupId=&quot;100&quot;&gt;&lt;/ie:menuitem&gt;&lt;ie:menuitem id=&quot;zz7_ID_LoginAsDifferentUser&quot; type=&quot;option&quot; onMenuClick=&quot;javascript:LoginAsAnother('\u002f_layouts\u002fAccessDenied.aspx?loginasanotheruser=true', 0)&quot; menuGroupId=&quot;200&quot;&gt;&lt;/ie:menuitem&gt;&lt;ie:menuitem id=&quot;zz8_ID_RequestAccess&quot; type=&quot;option&quot; onMenuClick=&quot;window.location = '/_layouts/reqacc.aspx?type=list&amp;amp;name=%7B36F0105B%2D0F8E%2D4A22%2DBE90%2D716A51E97B5D%7D';&quot; menuGroupId=&quot;200&quot;&gt;&lt;/ie:menuitem&gt;&lt;ie:menuitem id=&quot;zz9_ID_Logout&quot; type=&quot;option&quot; onMenuClick=&quot;window.location = '/_layouts/SignOut.aspx';&quot; menuGroupId=&quot;200&quot;&gt;&lt;/ie:menuitem&gt;&lt;/menu&gt;&lt;/span&gt;&lt;span title=&quot;Open Menu&quot;&gt;&lt;div id=&quot;zz10_Menu_t&quot; class=&quot;ms-SPLink ms-SpLinkButtonInActive&quot; onmouseover=&quot;MMU_PopMenuIfShowing(this);MMU_EcbTableMouseOverOut(this, true)&quot; hoverActive=&quot;ms-SPLink ms-SpLinkButtonActive&quot; hoverInactive=&quot;ms-SPLink ms-SpLinkButtonInActive&quot; onclick=&quot; MMU_Open(byid(''), MMU_GetMenuFromClientId('zz10_Menu'),event,false, null, 0);&quot; foa=&quot;MMU_GetMenuFromClientId('zz10_Menu')&quot; oncontextmenu=&quot;this.click(); return false;&quot; nowrap=&quot;nowrap&quot;&gt;&lt;a id=&quot;zz10_Menu&quot; accesskey=&quot;L&quot; href=&quot;#&quot; onclick=&quot;javascript:return false;&quot; style=&quot;cursor:pointer;white-space:nowrap;&quot; onfocus=&quot;MMU_EcbLinkOnFocusBlur(byid(''), this, true);&quot; onkeydown=&quot;MMU_EcbLinkOnKeyDown(byid(''), MMU_GetMenuFromClientId('zz10_Menu'), event);&quot; onclick=&quot; MMU_Open(byid(''), MMU_GetMenuFromClientId('zz10_Menu'),event,false, null, 0);&quot; oncontextmenu=&quot;this.click(); return false;&quot; menuTokenValues=&quot;MENUCLIENTID=zz10_Menu,TEMPLATECLIENTID=zz5_ID_PersonalActionMenu&quot; serverclientid=&quot;zz10_Menu&quot;&gt;Welcome LitwareInc Administrator&lt;img src=&quot;/_layouts/images/blank.gif&quot; border=&quot;0&quot; alt=&quot;Use SHIFT+ENTER to open the menu (new window).&quot;/&gt;&lt;/a&gt;&lt;img align=&quot;absbottom&quot; src=&quot;/_layouts/images/menudark.gif&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;/span&gt;&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;var _spUserId=1;&lt;/script&gt; &lt;a id=&quot;explitLogout_ExplicitLogin&quot; Href=&quot;_controltemplates/http://litwaredemo/_layouts/Authenticate.aspx&quot; style=&quot;display:none&quot;&gt;Sign In&lt;/a&gt; " __designer:Values="&lt;P N='ID' ID='1' T='explitLogout' /&gt;&lt;P N='TemplateControl' R='0' /&gt;"/></td> </tr> </table> </div> <div class="console"> <PublishingConsole:Console runat="server" __designer:Preview=" &lt;!-- Console --&gt; &lt;span id=&quot;ctl00_publishingContext1&quot;&gt;&lt;/span&gt; &lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;if (document.getElementById('mpdmconsole')) { ShowConsoleBlockPaddingWithOverhang('mpLeftBackPadding', 'mpRightBackPadding', 'masterPageLeftOverhang', 'masterPageRightOverhang'); } &lt;/script&gt; &lt;!-- Console --&gt; " __designer:Values="&lt;P N='TemplateControl' R='0' /&gt;"/> </div> </td> </tr> <tr> <td colspan="2" > <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan="4" class="topArea"> <SharePoint:AspMenu ID="logoLinkId" runat="server" DataSourceID="SiteMapDataSourceRoot" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="0" AccessKey="1" CssClass="logo" __designer:Preview="&lt;table id=&quot;zz12_logoLinkId&quot; class=&quot;logo&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot;&gt; &lt;tr id=&quot;zz12_logoLinkIdn0&quot;&gt; &lt;td&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;width:100%;&quot;&gt;&lt;a Href=&quot;/Pages/Default.aspx&quot; accesskey=&quot;1&quot; style=&quot;text-decoration:none;&quot;&gt;Home&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;" __designer:Values="&lt;P N='ID' T='logoLinkId' /&gt;&lt;P N='MaximumDynamicDisplayLevels' T='0' /&gt;&lt;P N='DataSourceID' T='SiteMapDataSourceRoot' /&gt;&lt;P N='AccessKey' T='1' /&gt;&lt;P N='ControlStyle'&gt;&lt;P N='CssClass' ID='1' T='logo' /&gt;&lt;P N='Font' ID='2' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='CssClass' R='1' /&gt;&lt;P N='Font' R='2' /&gt;&lt;P N='Page' ID='3' /&gt;&lt;P N='TemplateControl' ID='4' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;" __designer:Templates="&lt;Group Name=&quot;Item Templates&quot;&gt;&lt;Template Name=&quot;StaticItemTemplate&quot; Flags=&quot;D&quot; Content=&quot;&quot; /&gt;&lt;Template Name=&quot;DynamicItemTemplate&quot; Flags=&quot;D&quot; Content=&quot;&quot; /&gt;&lt;/Group&gt;"/> <PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDataSourceRoot" Runat="server" SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="true" __designer:Preview="&lt;table cellpadding=4 cellspacing=0 style=&quot;font:messagebox;color:buttontext;background-color:buttonface;border: solid 1px;border-top-color:buttonhighlight;border-left-color:buttonhighlight;border-bottom-color:buttonshadow;border-right-color:buttonshadow&quot;&gt; &lt;tr&gt;&lt;td nowrap&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;PortalSiteMapDataSource&lt;/span&gt; - SiteMapDataSourceRoot&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;" __designer:Values="&lt;P N='ID' T='SiteMapDataSourceRoot' /&gt;&lt;P N='SiteMapProvider' T='CombinedNavSiteMapProvider' /&gt;&lt;P N='StartFromCurrentNode' T='True' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> <div class="topLinkBar"> <div class="topLink"> <PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server" __designer:Preview="&lt;span __designer:NonVisual=&quot;true&quot;&gt;&lt;table cellpadding=4 cellspacing=0 style=&quot;font:messagebox;color:buttontext;background-color:buttonface;border: solid 1px;border-top-color:buttonhighlight;border-left-color:buttonhighlight;border-bottom-color:buttonshadow;border-right-color:buttonshadow&quot;&gt; &lt;tr&gt;&lt;td nowrap&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;VariationDataSource&lt;/span&gt; - LabelMenuDataSource&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;&lt;/span&gt; " __designer:Values="&lt;P N='ID' ID='1' T='labelmenu1' /&gt;&lt;P N='TemplateControl' R='0' /&gt;"/> </div> </div> </td> </tr> <tr class="topNavContainer"> <td class="topNavRoundLeft"> <div class="glassSpacerLeft" /> </td> <td valign="top" width="100%"> <SharePoint:AspMenu ID="GlobalNav" Runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="1" StaticSubMenuIndent="0" DynamicHorizontalOffset="0" DynamicVerticalOffset="-8" StaticEnableDefaultPopOutImage="false" ItemWrap="false" SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>" CssClass="topNav" __designer:Preview="&lt;table id=&quot;zz13_GlobalNav&quot; class=&quot;topNav&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot;&gt; &lt;tr&gt; &lt;td title=&quot;Document Center site&quot; id=&quot;zz13_GlobalNavn0&quot;&gt;&lt;table class=&quot;topNavItem&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;&quot;&gt;&lt;a class=&quot;topNavItem&quot; Href=&quot;/Docs&quot; style=&quot;text-decoration:none;border-style:none;&quot;&gt;Document Center&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td title=&quot;Company News Home&quot; id=&quot;zz13_GlobalNavn1&quot;&gt;&lt;table class=&quot;topNavItem&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;&quot;&gt;&lt;a class=&quot;topNavItem&quot; Href=&quot;/News/Pages/Default.aspx&quot; style=&quot;text-decoration:none;border-style:none;&quot;&gt;News&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td title=&quot;Report Center&quot; id=&quot;zz13_GlobalNavn2&quot;&gt;&lt;table class=&quot;topNavItem&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;&quot;&gt;&lt;a class=&quot;topNavItem&quot; Href=&quot;/Reports/Pages/Default.aspx&quot; style=&quot;text-decoration:none;border-style:none;&quot;&gt;Reports&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td title=&quot;The Search Center displays search results&quot; id=&quot;zz13_GlobalNavn3&quot;&gt;&lt;table class=&quot;topNavItem&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;&quot;&gt;&lt;a class=&quot;topNavItem&quot; Href=&quot;/SearchCenter/Pages/default.aspx&quot; style=&quot;text-decoration:none;border-style:none;&quot;&gt;Search&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt;&lt;td title=&quot;Site Directory web&quot; id=&quot;zz13_GlobalNavn4&quot;&gt;&lt;table class=&quot;topNavItem&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td style=&quot;white-space:nowrap;&quot;&gt;&lt;a class=&quot;topNavItem&quot; Href=&quot;/SiteDirectory/Pages/category.aspx&quot; style=&quot;text-decoration:none;border-style:none;&quot;&gt;Sites&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/td&gt;&lt;td style=&quot;width:0px;&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;" __designer:Values="&lt;P N='ID' T='GlobalNav' /&gt;&lt;P N='DynamicHoverStyle'&gt;&lt;P N='CssClass' T='topNavFlyOutsHover' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='DynamicMenuItemStyle'&gt;&lt;P N='CssClass' T='topNavFlyOutsItem' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='DynamicMenuStyle'&gt;&lt;P N='CssClass' T='topNavFlyOuts' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='DynamicVerticalOffset' T='-8' /&gt;&lt;P N='MaximumDynamicDisplayLevels' T='1' /&gt;&lt;P N='Orientation' E='0' /&gt;&lt;P N='SkipLinkText' Bound='True' T='Resources:cms,masterpages_skiplinktext' /&gt;&lt;P N='StaticEnableDefaultPopOutImage' T='False' /&gt;&lt;P N='StaticHoverStyle'&gt;&lt;P N='CssClass' T='topNavHover' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='StaticMenuItemStyle'&gt;&lt;P N='CssClass' T='topNavItem' /&gt;&lt;P N='ItemSpacing' T='0px' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='StaticSelectedStyle'&gt;&lt;P N='CssClass' T='topNavSelected' /&gt;&lt;P N='ItemSpacing' T='0px' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='StaticSubMenuIndent' T='0px' /&gt;&lt;P N='DataSourceID' T='SiteMapDataSource1' /&gt;&lt;P N='ControlStyle'&gt;&lt;P N='CssClass' ID='1' T='topNav' /&gt;&lt;P N='Font' ID='2' /&gt;&lt;P N='IsEmpty' T='False' /&gt;&lt;/P&gt;&lt;P N='CssClass' R='1' /&gt;&lt;P N='Font' R='2' /&gt;&lt;P N='Page' ID='3' /&gt;&lt;P N='TemplateControl' ID='4' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;" __designer:Templates="&lt;Group Name=&quot;Item Templates&quot;&gt;&lt;Template Name=&quot;StaticItemTemplate&quot; Flags=&quot;D&quot; Content=&quot;&quot; /&gt;&lt;Template Name=&quot;DynamicItemTemplate&quot; Flags=&quot;D&quot; Content=&quot;&quot; /&gt;&lt;/Group&gt;"> <StaticMenuItemStyle CssClass="topNavItem" ItemSpacing="0"/> <StaticSelectedStyle CssClass="topNavSelected" ItemSpacing="0"/> <StaticHoverStyle CssClass="topNavHover"/> <DynamicMenuStyle CssClass="topNavFlyOuts" /> <DynamicMenuItemStyle CssClass="topNavFlyOutsItem" /> <DynamicHoverStyle CssClass="topNavFlyOutsHover"/> </SharePoint:AspMenu> <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server" SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading" __designer:Preview="&lt;table cellpadding=4 cellspacing=0 style=&quot;font:messagebox;color:buttontext;background-color:buttonface;border: solid 1px;border-top-color:buttonhighlight;border-left-color:buttonhighlight;border-bottom-color:buttonshadow;border-right-color:buttonshadow&quot;&gt; &lt;tr&gt;&lt;td nowrap&gt;&lt;span style=&quot;font-weight:bold&quot;&gt;PortalSiteMapDataSource&lt;/span&gt; - siteMapDataSource1&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;" __designer:Values="&lt;P N='ID' T='siteMapDataSource1' /&gt;&lt;P N='SiteMapProvider' T='CombinedNavSiteMapProvider' /&gt;&lt;P N='StartFromCurrentNode' T='True' /&gt;&lt;P N='ShowStartingNode' T='False' /&gt;&lt;P N='TreatStartingNodeAsCurrent' T='True' /&gt;&lt;P N='TrimNonCurrentTypes' E='32' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/> </td> <td> <div class="search"> <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server"> <SPSWC:SearchBoxEx id="SearchBox" RegisterStyles="false" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100" GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>" GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" UseSiteDefaults="true" DropDownMode = "HideScopeDD" SuppressWebPartChrome="true" runat="server" WebPart="true" __WebPartId="{7DECDCCA-FDA0-4739-8F0E-7B8DE48F0E0D}" __Preview="&lt;table TOPLEVEL border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr&gt; &lt;td&gt;&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;&gt; &lt;tr class=&quot;ms-WPHeader&quot;&gt; &lt;td title=&quot;&quot; id=&quot;WebPart

    Read the article

  • Why my onsubmitg is not firing - Spring

    - by GigaPr
    Hi, i have a controller public class EditUserController extends BaseController { public EditUserController() { setCommandClass(User.class); setCommandName("editaUser"); } public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModelAndView modelAndView = new ModelAndView("editUser"); String id = request.getParameter("id"); if(!id.isEmpty()) { User user = this.userServiceImplementation.get(Integer.parseInt(id)); modelAndView.addObject("editaUser", user); } return modelAndView; } } and the view <form:form method="POST" commandName="editaUser" cssClass="addUserForm"> <div class="floatL"> <div class="padding5"> <div class="fieldContainer"> <strong>First Name:</strong>&nbsp; </div> <form:errors path="firstName" cssClass="error"/> <form:input path="firstName" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Last Name:</strong>&nbsp; </div> <form:errors path="lastName" cssClass="error"/> <form:input path="lastName" cssClass="textArea" /> </div> </div> <div class="floatR"> <div class="padding5"> <div class="fieldContainer"> <strong>Username:</strong>&nbsp; </div> <form:errors path="username" cssClass="error"/> <form:input path="username" cssClass="textArea" /> </div> <div class="padding5"> <div class="fieldContainer"> <strong>Password</strong>&nbsp; </div> <form:errors path="password" cssClass="error"/> <form:input path="password" cssClass="textArea"/> </div> </div> <input type="submit" class="floatR" value="Save" > </form:form> and the bean definition looks like <bean name="/editUser.htm" class="com.rssFeed.mvc.EditUserController"> <property name="userServiceImplementation" ref="userServiceImplementation"/> <property name="commandName" value="editaUser" /> <property name="successView" value="users"/> <property name="sessionForm" value="true"/> </bean> I populate the view using the querystring but i would lke to update the record in the database on click of the submit button. i tried to insert a on submit method protected ModelAndView onSubmit(Object command, BindException bindException) throws Exception { return new ModelAndView(getSuccessView()); } but it never fires What is the problem i do not get it?? thanks

    Read the article

  • ASP.NET List Control

    - by Ricardo Peres
    Today I developed a simple control for generating lists in ASP.NET, something that the base class library does not contain; it allows for nested lists where the list item types and images can be configured on a list by list basis. Since it was a great fun to develop, I'd like to share it here. Here is the code: [ParseChildren(true)] [PersistChildren(false)] public class List: WebControl { public List(): base("ul") { this.Items = new List(); this.ListStyleType = ListStyleType.Auto; this.ListStyleImageUrl = String.Empty; this.CommonCssClass = String.Empty; this.ContainerCssClass = String.Empty; } [DefaultValue(ListStyleType.Auto)] public ListStyleType ListStyleType { get; set; } [DefaultValue("")] [UrlProperty("*.png;*.gif;*.jpg")] public String ListStyleImageUrl { get; set; } [DefaultValue("")] [CssClassProperty] public String CommonCssClass { get; set; } [DefaultValue("")] [CssClassProperty] public String ContainerCssClass { get; set; } [Browsable(false)] [PersistenceModeAttribute(PersistenceMode.InnerProperty)] public List Items { private set; get; } protected override void Render(HtmlTextWriter writer) { String cssClass = String.Join(" ", new String [] { this.CssClass, this.ContainerCssClass }); if (cssClass.Trim().Length != 0) { this.CssClass = cssClass; } if (String.IsNullOrEmpty(this.ListStyleImageUrl) == false) { this.Style[ HtmlTextWriterStyle.ListStyleImage ] = String.Format("url('{0}')", this.ResolveClientUrl(this.ListStyleImageUrl)); } if (this.ListStyleType != ListStyleType.Auto) { switch (this.ListStyleType) { case ListStyleType.Circle: case ListStyleType.Decimal: case ListStyleType.Disc: case ListStyleType.None: case ListStyleType.Square: this.Style [ HtmlTextWriterStyle.ListStyleType ] = this.ListStyleType.ToString().ToLower(); break; case ListStyleType.LowerAlpha: this.Style [ HtmlTextWriterStyle.ListStyleType ] = "lower-alpha"; break; case ListStyleType.LowerRoman: this.Style [ HtmlTextWriterStyle.ListStyleType ] = "lower-roman"; break; case ListStyleType.UpperAlpha: this.Style [ HtmlTextWriterStyle.ListStyleType ] = "upper-alpha"; break; case ListStyleType.UpperRoman: this.Style [ HtmlTextWriterStyle.ListStyleType ] = "upper-roman"; break; } } base.Render(writer); } protected override void RenderChildren(HtmlTextWriter writer) { foreach (ListItem item in this.Items) { this.writeItem(item, this, 0); } base.RenderChildren(writer); } private void writeItem(ListItem item, Control control, Int32 depth) { HtmlGenericControl li = new HtmlGenericControl("li"); control.Controls.Add(li); if (String.IsNullOrEmpty(this.CommonCssClass) == false) { String cssClass = String.Join(" ", new String [] { this.CommonCssClass, this.CommonCssClass + depth }); li.Attributes [ "class" ] = cssClass; } foreach (String key in item.Attributes.Keys) { li.Attributes[key] = item.Attributes [ key ]; } li.InnerText = item.Text; if (item.ChildItems.Count != 0) { HtmlGenericControl ul = new HtmlGenericControl("ul"); li.Controls.Add(ul); if (String.IsNullOrEmpty(this.ContainerCssClass) == false) { ul.Attributes["class"] = this.ContainerCssClass; } if ((item.ListStyleType != ListStyleType.Auto) || (String.IsNullOrEmpty(item.ListStyleImageUrl) == false)) { if (String.IsNullOrEmpty(item.ListStyleImageUrl) == false) { ul.Style[HtmlTextWriterStyle.ListStyleImage] = String.Format("url('{0}');", this.ResolveClientUrl(item.ListStyleImageUrl)); } if (item.ListStyleType != ListStyleType.Auto) { switch (this.ListStyleType) { case ListStyleType.Circle: case ListStyleType.Decimal: case ListStyleType.Disc: case ListStyleType.None: case ListStyleType.Square: ul.Style[ HtmlTextWriterStyle.ListStyleType ] = item.ListStyleType.ToString().ToLower(); break; case ListStyleType.LowerAlpha: ul.Style [ HtmlTextWriterStyle.ListStyleType ] = "lower-alpha"; break; case ListStyleType.LowerRoman: ul.Style [ HtmlTextWriterStyle.ListStyleType ] = "lower-roman"; break; case ListStyleType.UpperAlpha: ul.Style [ HtmlTextWriterStyle.ListStyleType ] = "upper-alpha"; break; case ListStyleType.UpperRoman: ul.Style [ HtmlTextWriterStyle.ListStyleType ] = "upper-roman"; break; } } } foreach (ListItem childItem in item.ChildItems) { this.writeItem(childItem, ul, depth + 1); } } } } [Serializable] [ParseChildren(true, "ChildItems")] public class ListItem: IAttributeAccessor { public ListItem() { this.ChildItems = new List(); this.Attributes = new Dictionary(); this.Text = String.Empty; this.Value = String.Empty; this.ListStyleType = ListStyleType.Auto; this.ListStyleImageUrl = String.Empty; } [DefaultValue(ListStyleType.Auto)] public ListStyleType ListStyleType { get; set; } [DefaultValue("")] [UrlProperty("*.png;*.gif;*.jpg")] public String ListStyleImageUrl { get; set; } [DefaultValue("")] public String Text { get; set; } [DefaultValue("")] public String Value { get; set; } [Browsable(false)] public List ChildItems { get; private set; } [Browsable(false)] public Dictionary Attributes { get; private set; } String IAttributeAccessor.GetAttribute(String key) { return (this.Attributes [ key ]); } void IAttributeAccessor.SetAttribute(String key, String value) { this.Attributes [ key ] = value; } } [Serializable] public enum ListStyleType { Auto = 0, Disc, Circle, Square, Decimal, LowerRoman, UpperRoman, LowerAlpha, UpperAlpha, None } SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • Access Master Page Controls II

    - by Bunch
    Here is another way to access master page controls. This way has a bit less coding then my previous post on the subject. The scenario would be that you have a master page with a few navigation buttons at the top for users to navigate the app. After a button is clicked the corresponding aspx page would load in the ContentPlaceHolder. To make it easier for the users to see what page they are on I wanted the clicked navigation button to change color. This would be a quick visual for the user and is useful when inevitably they are interrupted with something else and cannot get back to what they were doing for a little while. Anyway the code is something like this. Master page: <body>     <form id="form1" runat="server">     <div id="header">     <asp:Panel ID="Panel1" runat="server" CssClass="panelHeader" Width="100%">        <center>            <label style="font-size: large; color: White;">Test Application</label>        </center>       <asp:Button ID="btnPage1" runat="server" Text="Page1" PostBackUrl="~/Page1.aspx" CssClass="navButton"/>       <asp:Button ID="btnPage2" runat="server" Text="Page2" PostBackUrl="~/Page2.aspx" CssClass="navButton"/>       <br />     </asp:Panel>     <br />     </div>     <div>         <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>         <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">         </asp:ContentPlaceHolder>     </div>     </form> </body> Page 1: VB Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load     Dim clickedButton As Button = Master.FindControl("btnPage1")     clickedButton.CssClass = "navButtonClicked" End Sub CSharp protected void Page_Load(object sender, EventArgs e) {     Button clickedButton;     clickedButton = (Button)Master.FindControl("btnPage1");     clickedButton.CssClass = "navButtonClicked"; } CSS: .navButton {     background-color: White;     border: 1px #4e667d solid;     color: #2275a7;     display: inline;     line-height: 1.35em;     text-decoration: none;     white-space: nowrap;     width: 100px;     text-align: center;     margin-bottom: 10px;     margin-left: 5px;     height: 30px; } .navButtonClicked {     background-color:#FFFF86;     border: 1px #4e667d solid;     color: #2275a7;     display: inline;     line-height: 1.35em;     text-decoration: none;     white-space: nowrap;     width: 100px;     text-align: center;     margin-bottom: 10px;     margin-left: 5px;     height: 30px; } The idea is pretty simple, use FindControl for the master page in the page load of your aspx page. In the example I changed the CssClass for the aspx page's corresponding button to navButtonClicked which has a different background-color and makes the clicked button stand out. Technorati Tags: ASP.Net,CSS,CSharp,VB.Net

    Read the article

  • Suggestions for displaying code on webpages, MUST use <br> for newline

    - by bguiz
    Hi, I want to post code snippets online (wordpress.com blog) - and have its whitespace formatted nicely. See the answers suggested by this other SO question: Those would be OK, except that I like to copy code to clip board or clip entire pages using Evernote - and they use either the <pre> tag or <table> (or both) to format the code. So I end up with text whose newlines and white spaces ignored, e.g. string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">"; // single line comments // second single line override protected void OnLoad(EventArgs e) { if(Attributes["class"]&nbsp;!= null) { //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"]; } base.OnLoad(e); } Which I find rather annoying myself. I find that if the code was formatted using <br> tags, they copy/ clip porperly, e.g. string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">"; // single line comments // second single line override protected void OnLoad(EventArgs e) { if(Attributes["class"]&nbsp;!= null) { //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"]; } base.OnLoad(e); } I find this annoying myself, so I don't want to inflict it upon others when I post my own code. Please suggest methods of posting code snippets online that are able to do this. I would like to emphasise that syntax highlighting capability is secondary to correct white space markup. Thank you

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >