.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Hiding row tag on certain conditions

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
Hi, I am using Sharepoint Designer to hide <tr> tag(including it's child control) in my sharepoint page. The requirement is to hide <tr> tag if current page url is http://abc else it remain as it ll visible. I hv tried using Javascript, <script type="text/javascript"> <!-- function GetURL() { var URL =location.href; if(URL=="http://abc") { document.getElementbyId('test').style.visibility = 'hidden'; } } //--> </script>   ....In <BODY> part.... <tr id="test" runat="server" OnInit="GetURL();" > . . .     But this is giving an error ....") expencted" and "Invalid expression ter, ')'"    I tried using "OnLoad" attribute also but still not helping.... Any Suggetion whr I m doing wrong.....    

View Complete Post

More Related Resource Links

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Inserting rows via stored procedure and under certain conditions


I'm using Dynamic Data with Entity Framework in VS2010.

Let's say my table has these fields:

PersonID (FK)
LocationID (FK)

Hypothetical scenario (it's easier for me to explain this way, so just bear with me for now)... But let's say each row in the table represents "how many items were sold by such-and-such employee at such-and-such location," where location and person are foreign keys which are referencing other tables.  Basically, there should be no more than a ONE row which has a particular combination of Person and Location.  Makes sense?

So, when inserting new rows using my Dynamic Data app, the insert form displays editable fields for Person (dropdown), Location (dropdown), and Items Sold (textbox).  How do I prevent users from inserting another row into the table containing an already-existing combination of Person and Location?   How do I displaying useful feedback to them in the event that they DO attempt to do this?

I have several thoughts about this, but since I'm new to Dynamic Data, I'm not sure which way to go.  For example:

Option 1:  Use "cascading dropdowns" approach in the insert form and only pull in the "allowed" combinations of the two dropd

Toolbox: Database Documentation, API for Pre- and Post-Conditions, Blogs and More


In this month's column, Scott explores one-click database documentation, covers an API for pre- and post-conditions, takes a look at an interesting blog, and reviews the latest book about the ASP.NET MVC Framework.

Scott Mitchell

MSDN Magazine November 2009

Hiding url


 I have a folder where documents are stored and a user can access these documents based on thier role.  The page come up www.name.com/folder/documentName.pdf


How can I get the url to display www.name.com/folder ?

Linq to sql does not return appropriate multiple result sets with "If exists" conditions in the stor


Hello All,

I have a stored proc that returns 4 resultsets, they are in the format.

ALTER PROCEDURE [dbo].[pGetManagerEmployeeSummaryDummy]

    @ManagerStaffID int,
    @PeriodID int



IF EXISTS (select 1 from dbo.temployee e
    inner join dbo.temployeedetail ed
        on e.staffindividualid = ed.staffindividualid
        and ed.periodid = @PeriodID  
    inner join Incentive.tRole r
        on rm.IncentiveRoleID = r.RoleID
    where ed.ManagerIndividualStaffID = @ManagerStaffID
    AND r.RoleID = 1) --Closer
        SELECT e.StaffIndividualID, e.LastName, e.FirstName, r.RoleName, e.xname, e.yname

from dbo.temployee e

inner join dbo.temployeedetail ed
            on e.staffindividualid = ed.staffindividualid
            and ed.periodid = @PeriodID

where ed.ManagerIndividualStaffID = @ManagerStaffID

Calendar hiding the last item in a day


Has anyone run into this? We have a calendar that, only on the 8th and 9th of the month, fails to show the last item:

It shows the hyperlink for "1 more item", but when you click it, it remains at "1 more item", rather than changing to "collapse". After verifying, there is one more item in the list that isnt getting displayed.


DIV hiding


I have two div's in my website i want to hide one dive on a button click using javascript

Confirm message box on some conditions

Hi,In one of our application, after saving the data successfully we have to show the confirm message box whether to continue the process or not. On click of the yes i have to call one function.So how can i get confirm message box based on condition and how can i read the return value of the confirm message box to call other functions.Thanks in advance,Aruna

Hiding other month dates in ASP .Net Calendar Control

Often we need ASP .Net calendar control in our webpages. Most of the times we require navigation in between dates of the calendar control but there can be a requirement that when we want that users should not be able to select dates from month other than the current month.Some people might be thinking in mind that Microsoft has provided theShowNextPrevMonth property of a calendar control which can be set to false in order to disable the navigation in between months. Ok, this will disable navigation but what about the dates of adjacent months shown in current month?Following is the output of a normal Calendar control when ShowNextPrevMonth is not set to false.Note the red circles in above image. July and September will allow you to navigate through other months and red circles below will allow you to select dates of adjacent months.Ok now we set the ShowNextPrevMonth property to false and see the output. Following is the output in this case.So setting out the ShowNextPrevMonth property has disabled the July and Septemberlinks but dates of adjacent months are still there which can be selected as well. How to disable/hide these? Unfortunately there is no such default property provided using which one can disable or hide these dates but fortunately doing this using code is not a complex task. Use following code a

Hiding and showing the columns depends upon the filter condition

H,   We developed around 70 ssrs reports for our new application.Its like,all the report names are menrioned in the left hand side and if we click it,.Net calls the SSRS reports and shows the filters in the top of Right hand side.   We will select some filters there and then 'GO', it will fetch records. The issue now is, assume we have 6 columns in the report and depends upon the selection in the filter area, the columns should vanish.is it possible?

Hiding Upload Menu

  Hi All, Welcome to SharePoint Products & Techonologies. How to hide the UPLOAD menu in all the document libraries when the user is at 1st level and 2nd level of the folders in the doc library? Let me know if you have any queries. Thanks & Regards, Kumar.

When hiding in System Tray?

Why  when i hide my program in the system tray it does nothing there, i does only execute the code when i reopen it. is there some code to write for this Thanks.

SSRS column hiding

Hi    In My SSRS matrix report i have  3 dimension columns  'Branch','City','Location'  and one measure column 'Sales'   I have set the city column visible by 'Branch' and Location visiblity toggle by 'City'   But there is an issue found is if on loading the report for first time only branch is visible , But the report is taking the space for  City and Location -it is not visible although    Is there any way to completely hide the column in matrix report >>  we can hide the measure columns of course , but i want to hide the Dimenion columns    Regards  Sooraj

hiding hyperlink in url when its navigateurl is null

Hi Friends, I have a hyperlink control on my datalist. The navigate url property is bound to a field called "AttachFile" in my datatable. Is there a way I can make the hyperlink control invisible if the field it's bound to is null or blank? Thanks in Advance, Sepid 

TabControl Hiding the Tab Header

I have a requirement which says that I can have one or multiple tabs. If I have only tab I have to hide the tab header. I know there is no standard way of doing this so wondering if someone has figured out some special way of doing this or knows how this can be achieved. Thanks in advance Shams
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend