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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Conditional alert box in view

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net
 

When a view is shown, base on a simple conition in the model (Model.RenewalDate < DateTime.Today), I need to pop up an alert box saying 'Membership renewal is overdue'. There's no process required beyond that. Just a simply popup information box, then continue as normal.

I know the java to create an alert, or I could use the jquery modal, not bothered, but I can't work out the code in the view (yeah, I know logic doesn't belong in a view, but this really is a view concern as there's no functionality required beyond the message).




View Complete Post


More Related Resource Links

Applying conditional formatting to the 'AssignedTo' column does not work in a data view using Shar

  
This one is throwing me for a loop.  I've joined two lists using "Linked Sources" in SharePoint Designer.  On a new ASPX page I added a data view and added 3 columns (Title, Priority and AssignedTo) as a multi-Item view.   I can select a row and apply conditional formatting to the Title field (changing the background color if @title = 'Parent 1') and the changes are displayed in the design pane.   The only oddity there is that I have to go back and edit the condition in advanced mode, changing the XPath expression from ../../../Rows/Row/@Title = 'Parent 1' to @Title = 'Parent 1'  and then it seems to work just fine. Here's the problem.  I want the condition applied to the AssignedTo column (hide row if 'AssignedTo != 'John Doe')  If I create a condition to hide contents if the AssignedTo = 'John Doe' it creates the XPath expression ../../../Rows/Row/@AssignedTo = 'John Doe'.  When I save it, the row is still visible.  If I edit the XPath expression, changing it to @AssignedTo = 'John Doe' and save it the row is still visible.  The same is true if I simply try to change the background color, conditionally formatted  against the AssignedTo column. Does anyone have any ideas here?              

conditional alert on button click

  

Hi all:
I have a textbox,listbox and button  enclosed in updatepanel. I want to that if user types something and click the button, if will check in db, if that values exist in db, then it will be added in listbox, otherwise a javascript alert will be shown saying, 'value1' does not exist in database. How can I do this. I tried foloowing code in button click but it is not showing alert.
 String myscript = "alert('I am here');";
 Page.ClientScript.RegisterStartupScript(this.GetType(), "myscript", myscript, true);

Sharepoint Designer - Conditional Formattting with column not in view

  

I'm trying to apply conditional formatting to a view and it works, but only if all the columns the conditional criteria are based on.  

This sort of defeats the purpose since I want to just highlight an the Title of the list item if a column within the list item that is not currently visible meet my criteria. I'm trying to save screen real estate space by displaying fewer columns and also to try to increase page rendering time. However, I doubt I'd really be decreasing page load times if I'm still requiring even data that is not displayed to be read.  

Anyone know of a workaround?  


How do I view all immediate alert activity?

  

I have a list that external users can create alerts based upon CAML query.  When a new document is added, they get an email alert (if they have one set up) based on that.  Some users report never getting alerts.

How do I view all activity surrounding alerts, such as:

1) When did immediate alerts run.

2) Who was sent an email.

3) What was in the email.

Basically everything an admin would want to know about alerts being sent out.

If SP will not do it, are there any 3rd party tools out there?

 

Thanks for any help.

 


--[_]-[_]--

Conditional Partial View Rendering

  

This is probably a no-brainer, but my head is not working today.

Just to get it work, I got a controller action that make use of a switch statement to decide which partial view to render, based on one of the members of the model passed in.  (Written by someone else for what it matter...I'm just cleaning up)

The viewmodel is overcomplicated, but that's not my decision right now and just have to live with it.

All partial's get rendered passing the same viewmodel, just a different partial get called.

 switch (model.something.code)
      {
        case 1: 
          return PartialView("partial111", model);
		case 2:
			return PartialView("partial222", model);
			
		// ... and so it goes on...




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.

Using Conditional Split data Transfer in SSIS 2008

  
This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

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

view state vs request parameters

  

If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Thanks.



Form view in ASP.NET

  

hi all...!
i have a database and i create a form with button edit,delete, New Registration..using Formview in asp.net..
everything was working good...

And i write SQL statement to get New ID number into dropdownlist/TextBox when i click button "New Registration".

i can get new(next) ID number after read database
it's also working good

Now i want change it to get ID which was deleted from table and replace the ID with new record...what i need is when i click "New Registration" i want get deleted "ID" first and then go to new record ID...

my code is here:-it working for get next ID after read database.

SELECT min(PANG)
FROM (SELECT ID + 1 AS PANG
FROM Table1
EXCEPT SELECT ID FROM Table1)
AS boon WHERE PANG &gt;300000
</p>

partial view, 2 controllers

  

 Hi,

This is my first visit to the forums, I hope someone here can help me

 

I'm writing a small webapplication for creating repair tickets and adding comments, really basic

now I'm writing this in MVC2

So I have 2 controllers, 1 HomeController that does everything related to the tickets (listing tickets, creating new ones, editing) and 1 controller for the comments

the edit view for the homecontroller contains a partial view for /comment/create

so /home/edit/ticketnumber can edit the title and status of the ticket on the left side of the screen, the right side of the screen contains the partial view for adding comments

this is done like this:

Html.Renderaction("Create", "Comment");


but if I look at the generated html code when running the app, both save buttons go to /home/edit/ticketnumber

so the comment is never saved.

 

I hope this makes sense and that someone can help me solve this


replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.

  

i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.


WebDev.WebServer.exe has encounted a problem and needs to close when trying to view page in browser

  

Hi, whenever I load an aspx page in vwde2008, I get the message in the subject of this post.  After I click Ok on that, I get a dialog box, Unable to Connect to the ASP.Net development center.  What can I do to troubleshoot?

I am using Windows XP SP3, vwde2008 with SP1, on a HP desktop.  Also using Office 2003 if that is relevant at all.

Thanks, Justin


Inline conditional output

  

Is it possible to somehow output some content based upon some conditional check in Razor? If not, I hope this possibility will be added in the future. What I want to do is the following:

<option value="1" @if(ListMode == 1) { = "selected=\"true\"" }>Full list</option>


As I can't figure out a way to do this, I have to either make a helper that does it for me or write duplicate code.


Categories: 
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