|
Hi all,
I have created a user control which has a grid on a Asp:Panel, and a button.
When the user control is placed on a page only the button will be displayed and on the click of this button the panel will be displayed as a popup using ModalPopupExtender.
This page postbacks to itself on another button, during this event the Panel is displayed for a second and then goes off.
How can that be avoided? I don't want the Blank Panel to displayed while page load.
I have already tried setting the panel's visibility in various events of page life cycle to avoid it... but none works.
Any help or direction would be appreciable.
Thanks,
AB
Thanks & Regards,
AB
"Everyone is a genius at least once a year"
|
|
|
|
|
I think the original concept of the extender was to close or hide the panel after a postback is issued.
To keep the panel visible, use the show or hide in your postback code.
modalpopupextender.show()
modalpopuextender.hide()
|
|
|
|
|
I have done the same, but the problem is during page rendering the Panel is rendered for few seconds and then goes off... I don't want the panel to be displayed until the button is clicked.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
I have the following questions to ask about using session variables in a C# 2010 web form application that I am working on:
1. Do session variables exist on one one web page and/or can you pass the session variables between two web pages in the same web application? Can the session variables be shared between the two web pages? Can you explain your answer?
2. When a user is logged into a data web application that is used to update 2 tables in a sql server 2008 r2 database and uses session variables, do the session variables retain the their values?
Basically a user enters information for customer One and updates the database. Now the user needs to enter information for a different customer that is customer number two. The user returns to the first of a series of web pages to enter the informnation for customer two.
Do the session variables between when data is entered for customer One and the start of customer two retain the same value? If so, can you tell me how to clear out the values for those session variables when the user goes to enter data for the second customer? If not, can you tell me how the session variables get automatically cleared out?
|
|
|
|
|
|
When you assign a session value, the session value is held by the IIS Web Server, during the lifetime of the Session.
In other words, when a user goes to your website, the web server creates a session ID for that user, and creates a timeout, which is usually 20 minutes by default.
During that period in which the session is active, you can assign session values that will last until the timeout period. No matter what page the user is viewing, the values will remain until the timeout, in which they are all destroyed.
Be careful using session values, they do consume server memory, and are susceptible to hacking.
[EDIT]
sc steinhayse wrote: how to clear out the values for those session variables
Session.Add("secureLevel", 5)
Session.Remove("secureLevel")
Session.Abandon()
Session.Clear()
|
|
|
|
|
for (int i = 0; i < dtCurrentTable.Rows.Count; i++)
{
DropDownList ddlFrequency = (DropDownList)mdlpopupGrid.Rows[rowIndex].Cells[4].FindControl("ddlFrequency");
drCurrentRow = dtCurrentTable.NewRow();
dtCurrentTable.Rows[i]["Start_Salary"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[1].FindControl("txtStartSalary")).Text;
dtCurrentTable.Rows[i]["End_Salary"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[2].FindControl("txtEndSalary")).Text;
dtCurrentTable.Rows[i]["Increament"] = ((TextBox)mdlpopupGrid.Rows[rowIndex].Cells[3].FindControl("txtIncreament")).Text;
dtCurrentTable.Rows[i]["Frequency"] = ddlFrequency.SelectedValue.ToString();
rowIndex++;
}
This is my Code in Which I assigns the Values of all textboxes & Dropdownlist within mdlpopupGrid into a Datatable...
But the Problem is I dont get the Selectedvalue of Dropdownlist to my Datatable dtCurrentTable
|
|
|
|
|
sheringkapoting wrote: But the Problem is I dont get the Selectedvalue of Dropdownlist
Are you getting the value of Textbox of each Cells??
Sanjay Kunjam
------------------------------------------------------------------
"Computers are useless. They can only give answers" - Pablo Picasso
------------------------------------------------------------------
|
|
|
|
|
Yes I Get the Values of Text Boxes, The problem lies only in Dropdown List....
|
|
|
|
|
change the name of ddlFrequency to ddlFrequencyFC or anything..just rename it..
see the difference..
Thanks
|
|
|
|
|
In a C# 2010 web application, I would like to know how to convert a session variable that is in a date time format to a string value that displays in a textbox on the web application. I would like to only obtain the date part of the value.
I have tried lots of versions that look like the following:
Date1.Text = Session["Date1"].ToString("yyyy-MM-dd HH:mm:ss");
How would you setup this code so the value is acutally set correctly for the textbox?
|
|
|
|
|
Well, if you store the current date time in the session, then you might as well format it first before assigning to the session
session.add("Date1", DateTime.Now.ToString("yyyy"))
|
|
|
|
|
You need to cast the value you get from the session to a DateTime before you call ToString on it. Something like this (you can probably take out a few parens):
Date1.Text = ((DateTime)(Session["Date1"])).ToString("yyyy-MM-dd");
If you want to show a full date/time, but you only want the date component from the session, you can use the Date property, which will strip out the time:
Date1.Text = ((DateTime)(Session["Date1"])).Date.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
DateTime dt = Session["Date1"] as DateTime;
if(dt != null)
{
Date1.Text = dt.ToString("yyyy-MM-dd");
Date1.Text = dt.ToString("yyyy-MM-dd HH:mm:ss");
}
else
{
}
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
I have a Modal Popup Extender which I show on two different Button click events i.e
btnAddNew_Click() & having imgbtnNew as TargetControlID.
the problem is I want Two of the Textboxes txtFullName & txtShortName to be Disabled or Visible false on imgbtnNew_Click()
Where as Visible True on btnAddNew_Click()
Can anyone help....
|
|
|
|
|
I think you can ask the sender "sender" who fired the and called the function. I just used it a couple of days ago. You could of just Googled it to get the anwser.
string strID = ((System.Web.UI.Control) sender).ID;
{EDIT]
or you can use the .OnClientClick to issue some javascript to change the display state of the textbox from block to none. The javascript is fake, and just meant to give you an idea of how to use OnClientClick
.OnClientClick = "var txtID = getElementByID('txtBox'); txtID.style.display = 'none'; return true;"
|
|
|
|
|
While Executing the asp.net (C#) page. I found an error called Expected ')'. Actually the code block and design block doesn't contain any error..but it representing such error.. need to resolve it. kindly help me to solve this issue
dhipika g
|
|
|
|
|
The close brace is missing and you need to find it. Given the amount of code you've shown, I'd suggest looking over there behind the aspidistra.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
It could be in a user control. You'll have to find it. If the compiler expects something, you must give it. It is king.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Try debugging your source code. Looks like a query has a missing bracket somewhere.
|
|
|
|
|
The error will be displayed in your 'Output' window. Double click on the error message and it should take you to the line of code that is in error.
Once at the line in error make sure you have the same amount of matching open and closing brackets.
You error is common with something like e.g.
lnTemp = Len(lsAmount
should be for example
lnTemp = Len(lsAmount)
I hope this helps.
Kind Regards
Julian Mummery
|
|
|
|
|
check all the files aspx.cs and .aspx and .cs files.
suchita
|
|
|
|
|
I need to show below content on tooltip.Is it possible ?
Why do I need to confirm my contact details?
Arena Animation offers free Career Counselling by telephone. For this, we need to make sure that the person we have reached is the right one.
Ever been annoyed by a pesky tele-caller? Someone who calls you at random times of the day & night? Yes, we know exactly how that feels.
Arena Animation respects your privacy.
Our Counsellors ensure that they call you only with your permission. For this, we want you to confirm that the details you enter are correct & that there are no mistakes.
How do I confirm?
Simple! Just check your SMS/ email!
The moment you enter your phone number & email ID, Arena sends you a special code via SMS & email. Once you enter this code on our page, we know that this is your number & your email address - for real! Only after this confirmation do our Counsellors get a go-ahead to contact you.
So, to receive free Career Counselling from Arena, simply enter your correct number & email address on this form!
|
|
|
|
|
I would suggest using a jQuery plug-in to do tooltips since you want to do some formatting. Plus, since the text is so long no one could read it all with a standard tooltip because they disappear after X seconds.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
When I run the selected file and press upload image files the following error:
Compilation Error
Description: An error occurred during three days the compilation of a resource required to service this request. Please review the specific error details and modify sau your source code appropriately.
Compiler Error Message: CS0103: The name 'Common' does not exist in the current context
Source Error:
Line 51:
Line 52: / / file name to not be centralized file + extension of the file to upload
Line 53: strFileName = Common.GetFileName () + System.IO.Path.GetExtension (Hinh1.FileName) / / this line error immediately
Line 54:
Line 55: / / Path Large file I save
Common under which this namespace? I have tried namespace
using System.Data.Common;
but not
|
|
|
|