|
I'm having an issue with my datagrid. My grid is dynamically populated via my Sql Server database and each grid row contains a ButtonColumn with an imagebutton. If my page remains idle for more than 5-10 minutes after populating the grid (i.e. if I don't perform some type of action on the page such as clicking a button on the grid), then the entire grid loses its data. It simply goes blank.
One thing I noticed is if I click on a button on the page after this 5-10 minute period, the page never even accesses the button onClick event in the code behind. It simply accesses the Page_Load event and that's it.
Anyone know why this may be occurring?
Thanks.
-goalie35
|
|
|
|
|
I think your session got killed.
Either try to set a longer timeout for the session or you may have something that killed the session (I believe there are several reasons why a session could terminate quicker than the normal time).
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
Hello All
Can u pls help regarding viewstate..........
I'm using user contol for some code. Also using viewstate on form1.aspx(e.g.). User control is placed on this form. I need to access form viewstate value on usercotrol. is it possible?
is viewstate written on FORM available on User Control?
Pls help me in this regard.
Balasaheb
Software Developer
|
|
|
|
|
What is the Form viewstate value that you're looking to get? Do you mean a control value on that form that is stored in viewstate between postbacks?
|
|
|
|
|
Hi! You need to create a public property(set & get) in your user control.When you do this you can set the value of this property to anything your like (Viewstate in your case).
string name;
public string Name
{
set
{
name = value;
}
get
{
return name;
}
}
Access it in form like UserControl1.Name =Viewstate["object"];
Regards
|
|
|
|
|
Hi,
I am trying to create an web page using ASP.NET 2005, which should save data to data base SQL with out submiting the page or form. The web page should not submit and reload. On clicking an or moving an object i has to save it.
Plz any one suggest me with an example..
Know is Drop, Unknown is Ocean
|
|
|
|
|
Use AJAX to send a request to the server.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Thanks for you replay, Plz give me some examples links or tutorials, so i can able to understand it easily.
Once again thanks a lot
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
Hi
I am using COM object in Web Application. There is a problem to solve authentication & authorization issue for Server site. At the time of using the COM object it shows the error " ACCESS DENIED ". If I am writing <identity impersonate="true"> in web.config, it is OK but the AJAX file is not accessible for that reason.
if I am using iisreset in Run command, then the whole application is OK, but it is not possible to reset iis again and again in production server. Have you any idea for this?
For more clarification, suppose there is a link in a Web page interface. After click the link, one Word document will open. How we solve authentication/authorization issue in iis without affecting to other files like AJAX.
I am using ASP.NET with C#. I am not using MTS.
any idea, please write.
regards
|
|
|
|
|
Because, you set anable the impesonation in the web.config file and that will affect the entire web site, instead you may consider impersonating in code at runtime whenever you want to work with the COM object, for more information see http://support.microsoft.com/kb/306158/EN-US/[^]
Btw, are you using the Automation (with COM object) to work with the Word document? If so, you may consider using a third party library instead of COM.
|
|
|
|
|
hai2muru wrote: Pls......................
The title makes no sense, see Chris's tips[^]
Google[^] may quickly answer for this sort of questions.
|
|
|
|
|
Using VS 2003 is there any way to create a conditional web.config?
As that question is a little vague let me explain. In my project I use the web.config file to define various authorisation levels for specific areas of the project. For development purposes, under debug builds this config is not as restrictive as the release build.
At the moment, when we created a release build we have to manually alter the web.config file to release settings. On occasion, unfortunately some permissions have been missed or this manual process has faild somewhere.
So is there a way to create code style conditional statement in the web.config?
As an example:
#if DEBUG
<location path="MyPages/page1.aspx">
<system.web>
<authorization>
<allow users ="*" />
</authorization>
</system.web>
</location>
#else
<location path="MyPages/page1.aspx">
<system.web>
<authorization>
<deny users ="*" />
</authorization>
</system.web>
</location>
#endif
If this isnt possible is there any way of having two web.config files, one for release builds the other for debug builds? I suppose this could be done via some clever post build event scripts, however if there is an "official" method I would prefer to use that instead.
|
|
|
|
|
I am interested in knowing the answer to your question. The way I do it now is I have a dev web.config and a release web.config. I "publish" to a staging server then manually copy the files to the production server when it is ready. So it is easy enough for me to copy everything except web.config because it rarely changes at this point.
|
|
|
|
|
In the VS 2005, you may use the Web Deployment project, but AFAIK there's not any "official" way in VS 2003. That said, you may rely on the post build events like you said to that.
|
|
|
|
|
Hello,
I created a simple class as follows:
Public Class HelloWorld
Public Function SayMessage() As String
Return "Hello World!"
End Function
End Class
Usage:
Dim objHelloWorld As New HelloWorld()
MyLabel.Text = objHelloWorld.SayMessage()
Then I recreated the class using a property:
Public Class HelloWorld
Public ReadOnly Property Message() As String
Get
Return SayMessage()
End Get
End Property
Public Function SayMessage() As String
Return "Hello World!"
End Function
End Class
Usage:
Dim objHelloWorld As New HelloWorld()
MyLabel.Text = objHelloWorld.Message
Which appoach should I use or when to use which one?
Could you advice me on this?
Thanks,
Miguel
|
|
|
|
|
My question has a reason.
I have a class with a function named Get_OneRecord.
The function Get_OneRecord gets ONLY ONE record from a database using a Data Reader.
The record has 4 fields. So this function returns a string collection with the four fields.
Should I use 4 properties as follows:
Public ReadOnly Property Name() As String
Get
Return Get_OneRecord{1}
End Get
End Property
Public ReadOnly Property Address() As String
Get
Return Get_OneRecord{2}
End Get
End Property
Which will return the first field of the collection or array: MyLabel.Text = MyClass.Name ...
Or should I use the function and access each string collection item outside: MyLabel.Text = Get_OneRecord{1}
Do you understand my problem?
Thanks,
Miguel
|
|
|
|
|
Use properties, as they give a name to the values. "Name" is much more descriptive than "1".
Don't read the record from the database each time you use a property, though. Read the record the first time it's needed, and store the data in a private variable in the class.
Class
Private Data() as String
Public ReadOnly Property Name() As String
Get
If Data is Nothing Then Data = Get_OneRecord()
Return Data(0)
End Get
End Property
...
Private Sub Get_OneRecord() as String()
...
End Sub
End Class
---
b { font-weight: normal; }
|
|
|
|
|
Generally properties are used to get and set values, and methods are used when you perform some work.
As you are just getting a simple value, it would be logical to use a property.
If you did some more complicated work to get the value, like reading it from a file, it would be more logical to use a method.
In some cases properties can do a bit more work, but then there is a difference in how you expect properties and methods to handle the data. A property can for example read a value from file and keep the value in a private variable, so that it doesn't have to read the file if you read from the property again. If you have a method on the other hand, you would rather expect it to actually read the value from file each time you use it.
---
b { font-weight: normal; }
|
|
|
|
|
|
check this
http://www.codeproject.com/aspnet/PicManager.asp?df=100&forumid=156404&exp=0&select=1465072
|
|
|
|
|
Hi all! Pls help me with using spell checking capabilities of Ms-Word in asp.net.
Thanks.
|
|
|
|
|
Hi Friends,
I am filling treeview from sqlserver table, its working and I am happy.
But My problem is
I want to use SiteMapPath tool with that treeview but I dont know how? I tried to search over internet but couldn't find any good stuff.
I am not sure if i can use SiteMapPath tool in the above stated secnario. If I can use then please help or if you know any other method to provide SiteMapPath functionality, It would be a great help.
thanks in advance.
Naveed Kamboh
|
|
|
|
|
Hi,
You can use the the tree view's NavigateUrl property to navigate to different links. However, i gues for site map path we need to use the web.Sitemap file and add all the nodes.
|
|
|
|
|
Hello.
If i have some user errors I want to return to the client, what is best way to do it?
Example:
I have a WS:
[WebMethod]
public boolean addUser(struct userDetails)
In this registration I validate that the:
-phonenumber is in a valid format
-email is in a valid format
If these two validations fail I want to return the error message to the user.
What is the smoothest way to perform this ?
Regards,
Markus Foss, Oslo, Norway
|
|
|
|