.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 elements in a view - another newbe question

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net


I'm trying to realise how to make a div on the page hidden, from the controller.

the situation is this:

i have 2 radioboxes, which need to fill a hidden label with thier value, dependant on the one selected.

the second case is gettin the value in the ID part of the link, and hiding the radioboxes altogether.

been googling it for hours and could not find a solution for this?

View Complete Post

More Related Resource Links

General Controller to View logic question

Hello, I am currently learning the MVC2 Framework and I have a brief question in terms of my logic and if their are any flaws in it. I created a basic example in a couple of minutes that demonstrates the way I think about it. public ViewResult Index() { return View(); } public ViewResult Cookies() { return View(new Cookie()); } public ViewResult CookiesInput(Cookie cookie) { return View(cookie); }<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>I really like cookies</h2> Would you like a cookie? <% using (Html.BeginForm("Cookies", "Example")) { %> <p><input type="submit" value="Yes" /></p> <% } %> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Cookies</h2> <% using (Html.BeginForm("CookiesInput", "Example")) { %> <%= Html.EditorForModel() %> <p><input type="submit" value="Gimme" /></p> <% } %> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainConten

Noob Question - Using Linq in View

I just inherited an MVC2 application. So far my only experience with MVC is reading the Nerd Dinner sample chapter and downloading the nerd dinner app. I do plan to dive much deeper but i need a quick answer because i have to hit the ground running. So basically in the main Index view the view model is being passed as an IQueryable. Then he is doing some queries on the view model to loop through the data. See example below:<% if (Model.Where(w => w.State == workflowStep.Key).Count() > 0) { %>To me, even though minor, this is business logic and shouldn't be in the view. Shouldn't any type of logic like this be sorted out before you get to the view? Or is this common practice in MVC?Basically i want to know if I should spend time refactoring this thing or just go with the flow.  Thanks.

Easy Calendar View Question - I hope

I have a Calendar in Sharepoint Foundation 2010. The only thing I want to do but can't is to have the Event Description text shown along with the Event title. Is it possible? Some event last several hours so there is plenty of space to show the text. TIA

Another 'ViewModel closes the View' question...

Hi all, I'm somewhere in the middle of the learning curve that is the path to MVVM utopia!My question really concerns the ability to close a view from a view model.I don't want to be guilty of trying to force a solution to fit a pattern, but MVVM fits so well in all other areas there's just this one bit left to figure out.The project I'm working on is a system analagous to Microsoft Outlook.You have a main view (window) which has a list of things.These things could be messages or contacts in Outlook.From the main view you have the option to create a new thing or open an existing one.Regardless of which option you choose, a new view (window) opens to present you with a form for editing.From this point on, each new view that opens has the following options (relevant to my question)...1, Save.2, Close.3, Save & Close.Save is pretty straightforward, is just a property on the viewmodel which returns an ICommand (RelayCommand/DelegateCommand).Close is also pretty straightforward, that's just the cross in the top right hand corner of the window.Save & Close, however, is different. With option 2, the close is actually just a part of windows, we're not writing any code to do this.So how would I go about implementing option 3? Where the viewmodel first needs to persist the changes and then needs to close the view?Many thanks,MQCA

tree view OnPrerender Question



Im having the following problem i have a treeview that opens on a pop up window and is being populated from a database table.

What i want is to  add a onClick event to each node as the treeview loads so when i click on a node a javascript function can be called and do something.

How can i take the value of each node that is being populated cause i need to pass it as an argument at the javascript function

public void myTreeView_OnPreRender(object sender, EventArgs e)

        myTreeView.Attributes.Add("onclick", "javascript:doSomething('" + nodeValue + "')");


Thanks in advance


I have a newbe question about sql standard 2008, How do I merge 1 row of data from another DB to the


Hi everyone,

 I am new to data base type work. I have very little exsperience in database code. I set up an application that retrieves data from the UI that has four forms. The application calculates and modifies this data for storage in different fields in a database. The application itself is not very simple as to the operation of the print and rs232 operations. But I have all of that code written and have written code for updateing the local db with this information. I was able thru searches to find enough information to update the local db.

 I have not been able to find any code example for merging 1 row of data from one DB to another DB. That has the same data table and fields in both data bases.  Now these DB's are set up exactly same except for DB name and Table name. They have exactly the same field and column names. The only difference is the data in the primary key field, the database that is local builds two rows that the key field has the same data except for one letter and is build at different times. The remote data base has the same data in the key field except it does not have the letter at the end of the data.

 Local data base    Key                     Re

partitioned view performance tuning question


There are 20 tables with the same schema. And a view

create view Everything
select 1 as area, pk_col1, pk_col2, col1, col2, ... from T1
union all 
select 2 as area, pk_col1, pk_col2, col1, col2, ... from T2
union all 
select 3 as area, pk_col1, pk_col2, col1, col2, ... from T3
union all 
select 4 as area, pk_col1, pk_col2, col1, col2, ... from T4
union all 
select 5 as area, pk_col1, pk_col2, col1, col2, ... from T5

However, the foll

Hiding Columns In Create View Page


Is it possible to hide one or more columns where the columns are chosen to add them into the view? The users (who is creating the view) should not be able to see some of the columns in the create view page so that it is not possible to add them in the view.



Grid View and Datepicker related question, ( in C#) plz help me out


Hi all,

i am new to the IT industry , so i am struggling for few things, i request you all to help me out. I am using c# as my backend.

here is what i need -

1) i need an excel-sheet like gridview whose grid items are textboxes.

2) I need a Date-picker, which when selected, selects the week.

3)This is what is more imp to me- when i select a date, that particular week's dates and days(starting from monday) has to be my gridview's column headers. I am doing this for a timesheet application.

4) my Gridview's first column fields has to be dropdown lists which should populate its listitems from DB.

Model View ViewModel question



I´m playing around with XAML and MVVM, and have a question about the wiring between the model and the viewmodel:

If I have a model that updates its data on random times, what wiring is used between the model and the viewmodel to let the viewmodel know that the model has changed?.

Between the view and viewmodel a bindings and NotifyPropertyChanged would take care of this.


Trying to learn

Sharepoint Explorer View - Different Folder Icons Question


I have multiple XP pro clients accessing my sharepoint server and utilizing Explorer View on Document Librarys to access and modify documents and folders.  I have 2 users whose folders show up differently than the others and have some strange capability limitations that the rest of my user base does not experience.  I tried searching around for a solution or at least an explanation to what is happening on these 2 machines.  The  folder icon is different on these two machines and shows 2 small documents over teh folder in the icon.  What does this mean?  How do i fix it so that this machine has the same folders and capabilities as everyone else?  Thank you in advance to any who can shed light on this subject.  I tried to post a screen shot, but this forum does not allow pictures.





Truly Understanding View State

This article provides a detailed understanding of the ViewState.

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

Model View Controller (MVC) for ASP.NET

Model View Controller (MVC) architectures, immediately wonder how the MVC pattern can be applied in an ASP.NET world. This article will demonstrate how the MVC pattern can be applied to an ASP.NET web application and still maintain the basic Microsoft supplied architecture.

jQuery grid view plugin

jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

jQuery grid view plugin

jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css

How to use getElementById to get the elements in a form

There are many ways of accessing form elements, of which the easiest is by using the cross-browser W3C DOM document.getElementById method. Before we learn more about this method, it would be useful to know something about the Document Object Model (DOM), the concept of HTML nodes or elements, and the concept of containers.

Each time you load an HTML page, the web browser generates an internal representation of the page in the form of an inverted tree structure. Let us look at a simple form. We will use this form later to demonstrate the use of the getElementById method.
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