.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

Modalpopup not working when upgrade to 4.0

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Het there, I wrote this page a few years back in Asp.net 2, The webmaster recently updated the site to 4.0 and now the modalpopup isnt working any more. Here is the code:


<asp:GridView ID="GridView1" runat="server" DataSourceID="sqldatasource1"  Font-Size="Small" 
            AutoGenerateColumns="False" DataKeyNames="id" AllowSorting="True" CellPadding="40" CellSpacing="5" 
            ForeColor="#333333" GridLines="None"  >
                    <asp:ImageButton ID="ImageButton1" CommandName="Select" runat="server" ImageUrl='<%# Eval("tnailpic") %>' />
                    <%--<asp:TextBox ID="TextBox10" CssClass="gridtb" runat="server" Text='<%# Eval("id") %>' /><br />--%>
                    <asp:TextBox ID="TextBox2" CssClass="gridtb" runat="server" Text='<%# "Model: " + Eval("model") %>' /><br />
                    <asp:TextBox ID="TextBox3" CssClass="gridtb" runat="server" Text='<%# "Year: " + Eval("year") %>' /><br />
                    <asp:TextBox ID="TextBox9" CssClass="gridtb" runat="ser

View Complete Post

More Related Resource Links

FullTextQuery not working after upgrade to SharePoint 2010

I have a function   Public Function QueryEx(ByVal webUrl As String, ByVal queryXml As String) As DataSet     Dim ds As DataSet = Nothing   Try   Dim myCredentials As NetworkCredential = CredentialCache.DefaultNetworkCredentials sws =   New SearchService.QueryService sws.Url = webUrl &   "/" & webServiceName   CType(sws, SearchService.QueryService).QueryEx(queryXml)     Catch ex As Exception lblDebug.Text =   "QueryEx: " & ex.Message pnlError.Visible =   True ds = Nothing   Finally sws.Dispose()   End Try   Return ds     End Function and passed the following full text query wrapped in the appropriate xml SELECT FileExtension, Filename, EffectiveDate, Title, Author, State, PolicyType, ApplicationType, PolicyNumber, ClientCode, CreatedBy, Created, ModifiedBy, LastModifiedTime, Path FROM portal..scope() WHERE ("SCOPE" = 'MyDeptScope') AND "IsDocument" = 1  AND ("Filename" LIKE 'Sub%') this worked in SharePoint 2007. We upgraded to SharePoint 2010.  I have all the managed properties setup the same on both versions.  I had to modify the query to get past one error I was receiving to SELECT FileExtension, Filename, EffectiveDate, Title, Author, State, PolicyType, ApplicationType, Pol

ReportViewer webpart is not working after SharePoint 2010 upgrade


After upgrading to SharePoint 2010 and Reporting Services 2008 (separate servers), all our web part pages that have the ReportViewer web parts in them are not working.  The error we are getting is "Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe."  All the reports are working on the report server but not through the web parts.  We used Visual Studio 2005 to create these reports and they all work in MOSS 2007 that also ran Reporting Services 2005.  If we delete the web part with the error and put in the ReportViewer web part manually on the page in SharePoint 2010, the reports do work.  But there are too many reports to be doing this manually for every web part page.  We already tried making changes to the Handler Mappings but it did not resolve the errors.  As far as we can tell, all the DLLs are in the right places.  Any help or suggestions would be greatly appreciated.  Thanks.

SQL Server Compact v3.5 SqlCeEngine.Upgrade method not working on PocketPC 2003/Windows Mobile 2003

When trying to use the SqlCeEngine.Upgrade(string connectionString) method i get the following exception:

The Parameter is incorrect.
at System.Data.SqlServerCe.SqlCeEngine.ProcessResults()
at System.Data.SqlServerCe.SqlCeEngine.Repair()
at System.Data.SqlServerCe.SqlCeEngine.Upgrade()
at Vbi.Compact.ErbisPda.Client.Program.Main()

The same code works like a charm on a Windows Mobile 2005 device. I installed "SQL Server Compact v3.5 Core" and "SQL Server Compact v3.5 Repl" on both devices, the WCE4/Armv4 version on Pocket PC 2003 and the WCE5/Armv4i version on Windows Mobile 2005.

I am hoping someone can help me with this problem, its being a showstopper.

[edit]Please note that i am using v3.5 and not v3.5 SP1. This is because for some of our data access we use a 3rd party library that needs v3.5 without SP1. Also i didn't run across above problem when i deployed my application from Visual Studio 2008 SP1 (debugging), it does occur on a clean system with only the two mentioned SQL Server Compact cabs installed and our app.[/edit]

my requiredFieldvalidator is not working properly in my modalpopup


dear all, my requiredfieldvalidator is screwing up my ok button in my modalpopup and I dont know why. In otherwords, once I include my requiredfieldvalidator and the user clicks ok in the modalpopup, the ok doesnt get fired. see my code below.

<asp:GridView ID="GridView1" runat="server" autogeneratecolumns = "false"             
DataKeyNames = "ID_NUMBER, ID_QUANTITY"  >            
<asp:BoundField DataField = "ID_NUMBER" HeaderText = "ID_NUMBER" SortExpression = "ID_NUMBER" />            
<asp:BoundField DataField = "ID_QUANTITY" HeaderText = "ID_QUANTITY" SortExpression = "ID_QUANTITY" />        
<asp:TemplateField ItemStyle-Wrap = "false">            
<asp:ImageButton ID = "btnshowpopup" ImageUrl = "~/Images/edit.JPG" runat = "server" DisplayModalPopupID = "reduceqtybox" />            
<cc1:ModalPopupExtender ID = "reduceqtybox" runat = "server"           
 TargetControlID = "btnshowpopup"          
popupcontrolID = "pnlmodalpanel"           
CancelControlID = "btncancel"           
backgroundCssClass ="modalB

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

jquery confirm windows isn't working


Hi, i am using jquery to implement a modal confirm windows but it not working

i have a template field button with ajax confirm using jquery but i have a problem. Apper the confirm windows but when i click on "yes" doesn't execute the delete command. without ajax (using template field button and simple confirm windows javascript) works so well.

Can you give me a hand with this?

thx in advance!

<link href="_assets/css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="_assets/css/confirm.css" rel="stylesheet" type="text/css" />
<script src="_assets/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="_assets/js/jquery.simplemodal-1.1.1.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
       $(".deleteCustomer").click(function(ev) {
                var msg = $(this).attr("title");
                confirm(msg + "?");

Keyboard shortcuts stops working in WebMatrix


I'm often experiencing that keyboard shortcuts stops working in WebMatrix. This is very annoying as CTRL-S, CTRL-C, CTRL-V, etc. stops working, all of which are heavily used when programming. It's obviously hard to explain how to reproduce this, but I was wondering if someone knows a quick-fix?

update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


New off line application working with sdf file. Need advice


Hey Folks

I am working on a project currently where I need to get data out of a 3rd party vendor's software that uses a .sdf file I looked this up and its a SQL CE file. I was hoping to just link to with with access but thats apparently not going to happen. I need to link to the database extract data from it to a csv file for later use. I also and most important I need to get the data from it and create a report that can be printed while on a customers site that my or may not have web access so I need for this program to be on and off line. I had my webapplication that I have been working on open and was able to bring up the sdf file under the server exploere however I can't seem to get anything out of it when I try to do grid views or detail views errors out.

Can I use one of Visual Studio projects to create this sort of applicaiton if so what would be the best approach. I would love to get an access odbc driver since office is allready installed on the employee's laptop's



Logging to database is not working



Am using Enterprise library 4.0 for logging exceptions to SQL server database. The code is working fine if I run my asp.net application from the Visual studio IDE.However if I publish the site and host it on IIS, then my application is not logging the errors to database.Here is the page load event of my application.Kindly help me in finding out the error.

Thanks in advance


 protected void Page_Load(object sender, EventArgs e)
                //If exception occurs due to unauthorized access
                if ((Request.QueryString["Unauthorized"] != null) && (Request.QueryString["Unauthorized"].Equals("Y")))
                        lblErrorMessage.Text = "You are not authorized to view this page";
                        //Get the user and machine names                       
                        string strUserName = User.Identity.Name;
                        string strMachineName = System.Environment.MachineName;
                        //Raise Error
                        throw new System.UnauthorizedAccessException("Unauthorized access--User Name:" + strUserName + "--Machine Name:" + 

URL Rewriter.net - not working



I have a website that uses Querystrings to determine what content to show on a page. I would like to be able rewrite these URL's to become Search Engine Friendly URLs. So for example I would like to change http://www.website.co.uk/Company/Company/Conference.aspx?WebPage=ImportantDates to http://www.website.co.uk/Company/Company/Conference.aspx/ImportantDates.

I have been reading the following article by Scott Gu - http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx - who suggested using a HTTPModule such as URL Rewriter.net (http://urlrewriter.net/).

So I have done this and added the URLRewriter.dll file in my bin directory and altered the web.config (following Scott Gu's approach #2). However my URL's are not changing and I don't know what I am doing wrong. I have added the following in the web.config to try and change the URL's.


    <rewrite url="~/UKAIS/ConferenceWebPage.aspx?WebPage=(.+)$" to="~/UKAIS/ConferenceWebPage.aspx/$1" />

However my webpage URL remains with the ?WebPage querystring.

I am really stuck and any help would be very much appreciated.



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