|
for that you need to remove the browser cache, when user clicks logout
Have a look
|
|
|
|
|
how to remove browser cache???
|
|
|
|
|
|
pls i have a dropdown list which gets data from my database,
i want it to be filled only once when the page is loaded.
pls how do i archieve this.
thanks.
|
|
|
|
|
put the databinding in !ispostback
i.e.
if(!ispostback)
{
ddl.bind();
}
|
|
|
|
|
I have done so, i put the code snipet in the page load event,
it is giving me object refrence not set to an instance of an object,
pls what didi i do wrong
thank you.
|
|
|
|
|
Also set the datasource property as
if(!IsPostBack)
{
ddl.DataSource = collection;
ddl.DataBind();
}
|
|
|
|
|
thank you for your reply,
I am using dataset to load the tables,
i then assign the column i want to show to the list.
how do i databind with the dataset object.
thank you
|
|
|
|
|
it is working now..
thanks everybody.
|
|
|
|
|
set like this
ddl.DataValueField = "columnname1";
ddl.DataTextField = "columnname2";
ddl.DataSource = datatable;
ddl.DataBind();
|
|
|
|
|
Hi All,
I will use application cache in my application. I want where the application cache is stored and which formation.
Please help me
Regards
Rameshkumar.T
|
|
|
|
|
|
Thank you.
But i didnt know which format and location the cache data is stored in web server?
Pleaes help me
Regards
Rameshkumar.T
|
|
|
|
|
P.T.R.K wrote: But i didnt know which format and location the cache data is stored in web server?
I think this all discussed in detail in the article..
data is stored as inmemory objects at the webserver
|
|
|
|
|
Unless they mean the prompilation cache for ASP.Net applications.. (unlikely but you never know):
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
|
|
|
|
|
i m working on DataList Updating. for that i have taken one label and ImageButton in ItemTemplate of DataList.
I have bound data to DataList in Page_Load Event, When i trying to perform editing in DataList then i m getting following error-
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
AND if i m using Response.write() in postback then i m getting following error-
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
But if i m writting binding code in !IsPostBack then it is working .
AND if i m using LinkButton instead of ImageButton then it is working .
So plz tell me wht is the oproblen and how can i solve this problem
thank's
|
|
|
|
|
Here is the infamous error message
Object reference not set to an instance of an object. Yes, I know what the error message means...
Line 18: FuelDSTableAdapters.FuelTableAdapter dsFuelTableAdapter = new FuelDSTableAdapters.FuelTableAdapter();
Line 19: decimal totalFuel = (decimal)dsFuelTableAdapter.TotalFuel(DateTime.Parse(TextBox2.Text), DateTime.Parse(TextBox1.Text));
Weird thing is - it works based on the dates I put into the text boxes. I think it has something to do with when I moved the database from one pc to another...
If I do not query any data added to the database before I moved it to the new computer, it works. However, as soon as the dates I enter into the textboxes try to use new data - I get this error message.
I've deleted all the data - added some new data and now I get this error every time. Then, I deleted the database and added it as well as the ldf that accompanies it - it works only if I do not populate the db with any new data. - that is the wtf face in case you are wondering.
|
|
|
|
|
May i ask, which object is null?
|
|
|
|
|
Line 19: decimal totalFuel = (decimal)dsFuelTableAdapter.TotalFuel(DateTime.Parse(TextBox2.Text), DateTime.Parse(TextBox1.Text));
Line 19 throws the object reference error - as you can see I instantiate the object in line 18
|
|
|
|
|
I see your Line 19, but I raise you an object
Can you set a breakpoint and make sure your Textboxes aren't null?
Also, use your immediate window and do a DateTime.Parse(TextBox2.Text) to make sure that doesn't kack out.
Cheers,
|
|
|
|
|
TheyCallMeMrJames wrote: I see your Line 19, but I raise you an object
Can you set a breakpoint and make sure your Textboxes aren't null?
Also, use your immediate window and do a DateTime.Parse(TextBox2.Text) to make sure that doesn't kack out.
haha.
Text boxes are not null - the DateTime.Parse(TextBox) is also good... Wish it were that easy.
|
|
|
|
|
dorkyDonJuan999 wrote: Weird thing is - it works based on the dates I put into the text boxes. I think it has something to do with when I moved the database from one pc to another...
Could it be that both systems have different regional settings? The date-format is something that's defined system-wide, and can be set from the Control Panel.
If the conversion fails (from string to date), wouldn't that leave the object empty, thus resulting in said error?
I are Troll
|
|
|
|
|
Double checked the regional settings, they are both the same...I think the problem was I did not properly detach the database from host pc and then try to restore from backup on the new pc. I just copied the file and used the add existing item option under visual studios app_data folder.
However, the database works fine with updates, inserts, general select queries...It is just the dates that cause the issue when their is new data that was inserted after I moved the DB file.
|
|
|
|
|
when i export arabic data to csv,some junk values are displayed instead of arabic text
this is my code
Private Sub WriteDelimitedData(ByVal Data As DataTable, ByVal fileName As String)
Dim i As Integer
Try
Dim context As HttpContext = HttpContext.Current
context.Response.Clear()
context.Response.ContentType = "text/csv"
context.Response.AppendHeader("Content-Disposition", String.Format("attachment; filename={0}", fileName))
context.Response.ContentEncoding = Encoding.UTF8
context.Response.Charset = "UTF-8"
'Write column header names
For i = 0 To Data.Columns.Count - 1
If (i > 0) Then
context.Response.Write(",")
End If
context.Response.Write(Data.Columns(i).ColumnName)
Next
context.Response.Write(Environment.NewLine)
'Write data
For Each row As DataRow In Data.Rows
For i = 0 To Data.Columns.Count - 1
If (i > 0) Then
context.Response.Write(",")
End If
context.Response.Write(row.Item(i).ToString())
Next
context.Response.Write(Environment.NewLine)
Next
context.Response.End()
Catch ex As Exception
End Try
End Sub
|
|
|
|
|
i have the same problem too
can any one help us plz
|
|
|
|