I have a page with a gridview on it. The gridview can not be seen when the page is opened. There is a dropdownlist and a button on the page. The user is supposed to make a selection in the dropdown and then click the button (labeled "Go") and then the gridview appears. The problem is that the gridview appears in response to the dropdown selection, before the go button is clicked. I'm sure this is easy but how can I stop the gridview from appearing in response to a dropdown selection? The dropdown is called ddlfilter. This is the code I am using:
Part 1 (continued in next post):
Code:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"[URL]>
<script runat="server">
Private Function GetColumnIndexByName(row As GridViewRow, SearchColumnName As String) As Integer
Dim columnIndex As Integer = 0
For Each cell As DataControlFieldCell In row.Cells
If TypeOf cell.ContainingField Is BoundField Then
If DirectCast(cell.ContainingField, BoundField).DataField.Equals(SearchColumnName) Then
Exit For
End If
End If
columnIndex += 1
Next
Return columnIndex
End Function
Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If Page.IsPostBack() Then
If ddlFilter.SelectedItem.Text.ToString() <> "- ALL -" Then
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(GetColumnIndexByName(e.Row, ddlFilter.SelectedItem.Text.ToString())).CssClass = "viscol"
End If............
I have a vacation booking page and don't want customers to go directly to the booking page. (course in that case customers could enter there own dates or leave the dates blank)Is there a way that if a user enters www.mysite.com/booking.aspx into there browser it redirects to an error page.But the page must be visible after filling in arrival and disparture dates on a parent page. So to simplify: Can I check on opening booking.aspx if the sender is calendar.aspx then open booking.aspx else goto error page
I use a separate project for my data layer and call one class within it clsData.cs. I'd like to know which page from the Presentation Layer (in another project within the solution) has referenced it from the clsData side, if that's possible.
I have a gridview control sitting in a jQuery Accordian. The data in the grid diplays fine, however in IE 6 the page numbers do not display when the pane of the accordian is first opened. If you open another pane and then re-open the pane containing the grid view the number appear. There is also no issue with IE7 or later or FF.
I have an aspx application with 2 aspx pages. Second aspx page will get opened on click of a button in first aspx page using JavaScript. The problem is, when the second aspx page is getting opened, its Page_load event is not firing. Only when I refresh the second page, page_load event of second aspx page is fired. what might be the problem and what is to be done to fire the page_load event.
I following this article for sending SMS it is a winform application.. I have referenced all the Dll's to my asp.net application. I use an aspx page to detect a mobile device connected to a PC..... But it alwys shows COM 'n' Port could not be opened.
using SMS; using GsmComm.GsmCommunication; using GsmComm.PduConverter; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { GsmCommMain comm = new GsmCommMain(6, 9600, 300); comm.Open(); if (!comm.IsConnected()) { Response.Write("No Phone Connected"); } else { SmsSubmitPdu pdu = new SmsSubmitPdu("test", "+919999999999", ""); CommSetting.comm.SendMessage(pdu); } } }
EDIT:
I use the web development server that ships with Visual Studio... If go to Control Panel -> Phones & Modems -> Modems i could see my mobile connected in com6.. i have tested the winform application it works fine.Is this the answer? ASP.NET pages are supposed to work.What is happening over here is that when you click on open_com button, the ASP.NET page posts back to itself, executes the event handler i.e., opensthe port. Then when the page finishesprocessing the post back, it is unloaded. At this point the COM1 objects is also destroyed.
In our project there is Send Mail option. I need to get the acknowledgement when the user open that mail. Is it possible? We are developing the project using ASP.NET, C# and SQL Server.
I have one login page which contains popup control for entering login details. When user successfully logged in then Itemlist page will get open and login page also remains open (as per my requirement) with some text. Now if user reloads the login page then it will open second Itemlist page though first Itemlist page is opened. So i want to check on login page that if Itemlist page is already open then it doesn't open second itemlist page.
i have a asp.net web application with few hyperlinks
when clicked it used to open in a new window due to target="_blank" which is specified
it was wrking fine but due to some settings or changes done now its not getting opened the links without target="_blank" gets opened as it gets opened in the same parent window
When trying to open a page I am getting this error: Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened. I did some reading and it seems that this command woudl fix it:
from here [URL] aspnet_regiis -pa "NetFrameworkConfigurationKey" "ASPNET"
Adding ACL for access to the RSA Key container. The RSA key container was not found. failed . Now, I don't really understand all of this stuff (my boss just said: Heres the problem, fix it).
i have a breand new laptop with only the OS installed. I have installed VS2008 and its updates I also installed VS2010 and its updates. I started to recieve the above error when I try to access SQLExpress through the VS interface.
I deleted both version and all the SQL referances in the Install/Uninstall listing.
I have reinstalled VS2008 and its updates and I still get this message...
I find lots or solutions for this error when moving DB's from one machine to another.
What am I supposed to do?
Do I delete EVERYTHING (includein the OS) and start from scratch again!
My DD site runs in an intranet environment. Therefore,Integrated Windows authentication is used. On Windows Sever 2003 and IIS 6 connection to SQLEXPRESS 2005 possible only with a
On Windows Server 2008 and IIS 7 connect to SQLEXPRESS 2008 with Integrated Windows authentication cannot be nothing. I get the message.
CREATE DATABASE permission denied in database 'master'.An attempt to attach an auto-named database for file c:inetpubwwwrootDD_OborudovanieApp_DataMembership.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share
In my login page, after login, open default.aspx page with criptManager.RegisterStartupScript(this.Page, this.GetType(), "_opener", "window.open('Default.aspx');", true); but in default.aspx. on button click event ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "_opener", "window.open('Default2.aspx');", true); not running. How to run window.open from my file which is opened with ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "_opener", "window.open('Default.aspx');", true);
I have window application and I want to use same instance of opened forms from application. I know this is possible with singleton pattern so if you have code example of singleton pattern then
I have a navigation on my site that retrieves it's links from xml file..Does asp do this everytime a link is clicked on my site..I'm using a master page and the navigation code within the master page is below..So is the xml file opened and read each and every time? any way to cache it or something.below is my code
I have a user control with some asp.net controls and a submit buton. On clicking submit i save data to my db.Now I open this user control from a modal pop which is inside a grid. I am using a modal popup extender.When they hit save which is a button on my user control I just want to update my db. But whats happening is when i hit save the modal popup closes and i belive my update panel refreshes.How can i click the save button and still have my modal pop opened.
I am running MS Vista with the 3.5 Framework. I just loaded VS2008 Express and VB 2008 Express. I was able to create a ClassLibrary project (vbproj) in VB2008. However, when I try and open that in VS2008, I get an error : vbproj cannot be opened because its project type is not supported. The thing is that I cannot create any projects in VS2008 excecpt for Blank Solutions, because there are no templates available to choose from when I attempt a FileNewProject in VS 2008.
I have a parameter page in asp.net consisting of many parameters. I am using ajax and filtering the values of the parameters based on the hierarchy. For example, only those branchs appear of a department if a single department is selectd on the listbox.
I also have a link button on my parameter screen which opens a popup window with a listbox in it. On the popup window, i select some listitems which i pass through the session into parent page when the popup window is closed. Till now, my popup window gets all the values from the data source to fill the listbox.
What i want now is to show only the filtered values on the popup window based on the selections made on the parent pages' parameters.
Page2 having Button 2 and an ascx control UC1. UC1 has a Button 3. Page2 is a modal dialog ( window.showModalDialog )
on Click of Button1 open Page2(modal dialog).
Page2 has UC1. UC1 has a button B3. On click of B3,instead of directly going to B3_click event, another post back happens. Thereafter opens login.aspx in another browser ( It is losing Session containing UserDetails as well as other session details).
now even If I continue entering Username and password, page2 reloads again in the new browser.
I am totally lost.
1) I do not know why UC1 button click makes another postback and thereafter opens up into another page losing all the sessions!!
I want to retain teh sessions till i go back to page1.