|
You Can get the value using javascript like this
document.getElementById('textboxid').value;
and compare as u want.
Devjit ....
|
|
|
|
|
I have a small site where I want to allow people to upload a small XML file (via FileUpload control) and then "load" it into another page to edit and save back.
At the moment I am loading the file into an XmlDataDocument using FileUpload.PostedFile.InputStream and I am then storing this in the Session object as I don't want to save anything to the server if poss. e.g Session["myXml"]
This works perfectly locally and 90% of the time works on the server...but occasionally I get a null object error...despite having try/catch blocks around everything. Wierdly, if you F5 refresh the page, it usually loads after a refresh or two.
a) Is using the session object like this a "bad thing"?
b) Is there a better way?
c) Any idea how I trap the null object error as there is already a try/catch on the method that fails and around ALL the code in Page_Load().
Thanks for ANY help! It's doing my nut in!
|
|
|
|
|
What would be the xml file size (max)??
|
|
|
|
|
Are you angry with your webserver? Too big objects in Session degrade performance. You may need to review your design.
|
|
|
|
|
Is your session timing out and losing your object?
|
|
|
|
|
I don't think it's timing out. Set timeout to 60 anyway, just in case.
XML is 3-4kb only...tiny I think - hence wanting to pass it in Session object.
I wondered if it was the redirect kicking in BEFORE the file has been loaded?
How could I test for this, since it's not null?
<br />
try<br />
{<br />
if (FileUpload1.HasFile)<br />
{<br />
myXml = new XmlDataDocument();<br />
myXml.Load(FileUpload1.PostedFile.InputStream);<br />
myXml.FilePath = FileUpload1.FileName;<br />
Session.Add("myXml", myXml);<br />
Response.Redirect(calcPage);<br />
}<br />
else<br />
{<br />
Response.Write("You must select a File first");<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
Response.Write(ex.Message);<br />
}<br />
|
|
|
|
|
Hi all
I have an asp.net application where upon clicking a button all the text boxes and combo box border should be removed so i wrote like this for text boxes it worked fine
TxtFname.BorderColor = Color.Transparent
TxtFname.BorderStyle = BorderStyle.None
TxtFname.ReadOnly = True
But how to do it for dropdown list. Pl help
Prakash Mishra(Banglore,India)
|
|
|
|
|
|
hi Venkatesh
I am not very fa miler with CSS and i need the deliver this proj soon. If u can help pl. or tell me any article. i searched many articles but none helped my problem.
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
.YourClassName
{
BORDER-RIGHT: #1c5180 1px solid;
BORDER-TOP: #1c5180 1px solid;
FONT-SIZE: 8pt;
BORDER-LEFT: #1c5180 1px solid;
COLOR: #656565;
BORDER-BOTTOM: #1c5180 1px solid;
BACKGROUND-REPEAT: repeat;
FONT-FAMILY: Verdana;
BACKGROUND-COLOR: white;
TEXT-DECORATION: none
}
|
|
|
|
|
Removing the border of a select element is only possible in some browsers. Internet Explorer does not support it, Firefox and Netscape does.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
how to show a pop up message if any control is not selected when a submit button is clicked
suparichit
|
|
|
|
|
Use Javascript alert('your message goes here'); for that purpose.
Apurva Kaushal
|
|
|
|
|
Use Javascript
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
If you are using ValidationSummary then there is a MessageBox option too.
|
|
|
|
|
how to set scroll bar at the div bottom
plz help
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Use Javascript to set the Scrollbar at the div bottom.
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;
And don't mark it as Urgent. I hope you know the Rules of Posting the Questions Here.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
i have done this. but is working for few mint after that when page up lode or refresh then its go to up(because i am using ajax timer)
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
I don't think you have precise control over horizontal or vertical scrollbar right?
|
|
|
|
|
You can use CSS if your div is a fixed size and set the overflow:auto style.
|
|
|
|
|
by using 'Microsoft.Office.Interop.Excel.dll' can we set print settings of an excel file?
if possible tell me what and all we can do by using 'Microsoft.Office.Interop.Excel.dll'.
Pradeep Reddy
|
|
|
|
|
|
i have a rate button in my application.when ever it is selected for the firsttime it should work.when it is clicked for second time it should not work...
can u give me the idea how to do this
-- modified at 2:35 Tuesday 10th July, 2007
suparichit
|
|
|
|
|
Its very simple. First of all allow the user to register to rate it. and store the rating in the Database and again if he/she is rating just sent a pop-up that "You have rated already".
And please make sure that before posting the questions read the guidlines and post the question.
And be careful in mentioning the Subject.
Hereafterwards don't put the subject as "help me Plz" be specific to the question and make it a ssubject.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|