|
thanks u very much.
tbhattacharjee
|
|
|
|
|
Your welcome
|
|
|
|
|
hi guys. i want to store value in session to keep it between postbacks. after page is changed i don't need value anymore. is there a way to kill session on current page i am, before redirect (changing url)? i dont want to use ViewState.
void Page_Load()
{
if(!Page.IsPostBack)
{
Session["something"] = true
}
}
void Page_LoadComplete()
{
bool something = Session["something"] as bool;
}
|
|
|
|
|
You can use
Session.Remove("something");
wherever you want.
|
|
|
|
|
Am I understanding you correctly, that you need the value to be part of the session as long as the user is using PostBack, but on a new page load, the session value should be empty?
If that is the case, then you can do this simply like this
void Page_Load()
{
if(!Page.IsPostBack)
{
Session["something"] = true;
}
else
{
Session["something"] = false;
}
}
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi, I have a interview next week and I have been told there is a test to:
"The technical test will involve creating a SQL server database, importing data into the database and writing a programme to extract data using SQL and C# and ASP.NET."
Can anybody who has set or taken something similar please advise what I can expect here?
I am thinking the data may be in a flat file or excel spreadsheet and I would need to use DTS or import it via the SQL Server wizard? The extract bit, I would guess is either displaying the results on a web page or writing code to extract it to an excel file?
Thanks in advance!

|
|
|
|
|
Well you haven't told for what post you're going to attend interview and with how much experiance.
If the interview having purely dependency on SQL Db and IMPORT and EXPORT with it, Then It could be of SSRS ( Reporting service ),SSIS ( Integration service) or It could be of data synchronization services.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Sorry, it's for 1 to 2 years experience of C# ASP.NET, an element of Sharepoint is involved in the job but not in the test
|
|
|
|
|
They it will be quite simple Q&A's, Please make your ADO.Net fundamental very clear for that.
And All the best for Interview.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Thanks, can anybody else advise on what to expect for the test?
|
|
|
|
|
It is not really easy to tell that what questions will be asked in the interview. This completely depends on the person who is taking the interview. You can get some idea if you know that what kind applications that organization is building. Normally you can expect questions on the basic concepts of oops and their implementation and other stuffs. Besides they also give you some scenario and ask you to give your opinion on it. This is just to know your approach on the problem.
Apurva Kaushal
|
|
|
|
|
Don't use outdated terms like DTS. The current tool would be SSIS. If you don't plan on using entity framework in your sample or something else other than straight ADO.Net in the page, make sure you let them know that a real application would probably use some framework like nHibernate in a real data access layer and not just simple ADO.Net directly in the pages themselves.
Unless of course you personally would normally use ADO.Net directly in the pages. If so, slap yourself with a trout hourly until you learn all about separation of concerns and proper object oriented design.
|
|
|
|
|
Dear Experts,
My requirement is to get the file names in vss folder using .NET.
I have downloaded few dlls like Interop.SourceSafeTypeLib.dll, Microsoft.VisualStudio.SourceSafe.Interop.dll, ssapi.dll.
I have no idea in doing this. can any one help with a solution will be much appreciated.
|
|
|
|
|
You may be able to find your answer by examining the source in this article here on CP.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Hi guys,
Iam trying to update a nullable datetime field in my database using linq-sql.
What ever casting method i have tried i keep getting an error:
"Specified cast is not valid."
Does anyone know how to update a nullable DateTime? field using Linq-Sql? please help me.
I have tried:
myVar.dateredeemed = DateTime.Parse("2010-12-03");
myVar.dateredeemed = (DateTime?)dateTime;
myVar.dateredeemed = DateTime.Now;
I don't really what else i can try because all of the above won't work.
Please help me...
|
|
|
|
|
None of this screams LINQ-to-SQL. Your code should work is myVar.dateredeemed is of type DateTime? if not, that is the source of your problem.
This code works:
DateTime? foo;
foo = DateTime.Now;
However, you should be wary of this:
myVar.dateredeemed = DateTime.Parse("2010-12-03")
For two reasons:
- If the string really comes from user input, they can enter an incorrect value you need to decide whether this should be null or whether the user *must* enter a valid date. Whichever is the correct strategy, incorrect input will throw an error.
- Can the user enter no date, (i.e. "")? If so you code will not result in null
Finally, I'd say one more thing: If you have luxury of changing the database, avoid nulls (especially in databases) like the plague. You end up with problems similar to the one you have here, potential null reference exceptions, and they make coding SQL harder too. That's not to say don't ever use nulls, but you should think several times before using nullable columns. Personally, I'd use one of the SQL min/max dates in place of null to register "unknown", (a bit like replacing and unknown [null] string with "") but others will disagree. A null date (to represent a date not set yet) is one of the few places I think a null column might be pukka. </rant> - Sorry I didn't mean to go on like this .
|
|
|
|
|
Hello,
I have developed a Custom Control for ASP.NET Web Form. In a specific scenario, I dont want to get the Hosting Page's Load event executes. So, I want to clear the Hosting Page's Load Event handler delegates from my custom control. Is it possible ? I dont mind using Reflection, but can you please help me with code snippet example ?
|
|
|
|
|
Hai all,
I need to upload file to server and i am using input file to upload the file, my problem is postedfile.filename is always null.
I have tried using updatepanel and had same problem. Can anyone help me.
|
|
|
|
|
File upload doesn't work under UpdatePanel ByDefault. you need to set PostBackTrigger in <Triggers> Section of UpdatePanel by which you can force a complete PostBack .
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
I have tried that too but still it didnt work , the postedfile is null.
|
|
|
|
|
Make sure you are using it under !Page.IsPostBack Condition.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Actually in my form i had a ultrawebgrid and a template column as button,
when click the button by client side the value ll be assign to the fileupload control and
when i click the upload button the file should be uploaded .
My ultrawebgrid and upload button is inside refresh panel and fileupload is outside the refreshpanel.
|
|
|
|
|
You can't assign the filename in an upload control with javascript. That is a security feature. Otherwise a web site could tell the browser to upload things like password files and steal data.
|
|
|
|
|
T M Gray wrote: You can't assign the filename in an upload control with javascript
He's probably not asking of assigning values rather He wants value inside.
Regards,
Hiren.
"The more we give of anything, the more we shall get back." - Grace Speare
(you can consider this quote while giving vote also)
Microsoft Dynamics CRM
|
|
|
|
|
Yes i need only the value , in client side i am getting the path value but in server side it is null.
|
|
|
|