|
hi
i want using FormView in my webForm, for update my Data, but when i load data into my FormView and click Update linkButton, nothing occured(nothing postBack occured). how to use FormView for update data ?
|
|
|
|
|
|
well, if u r using VS.NET 2005 u can do it in a very simple way by using an SqlDataSource object. You can configure the SqlDataSource object by appropriately selecting the server name, the database and the table u want to add the data. Then it automatically generates the SELECT,INSERT,UPDATE,DELETE statements or u can use ur own stored Procedures to do them.
then drag n drop a formview on to the application and set it's datasource to SqlDataSource.
e.g: FormView1.DataSource = SqlDataSource1;
FormView1.DataBind();
|
|
|
|
|
It is often to see this tag on a aspx page in which javascript is created with somepage.ashx http handler. Does anyone know how or any good articles talking about how this is done, how to cache the javascript in client side and how to triger a rebuild for the javascript if data changed on server?
<div class="ForumSig">Tom Z. (PMA)</div>
|
|
|
|
|
You can append a random number querystring to the URL to prevent the useragents and proxy servers from caching your file.
|
|
|
|
|
Hello,
In my ASP.NET application I am tracking user behavior ( tracking pages visited by user ) . For doing this I created a HTTPModule and attached with the application. Everything worked smoothly. But my website contains number of HTML pages, so this HTTPModule was not tracking this HTML pages. For doing this, I mapped html and htm extensions to aspnet_isapi.dll in IIS. Now it started to track HTML pages also.
For tracking each user behaviors, I was storing his id in one session. But in HTML pages this session failed to work. It throws "session state is not available in this context exception" . I have added HttpHandlers for html and htm pages and mapped to System.Web.UI.PageHandlerFactory . Still I am getting the same error. Any body please help me to solve this issue ?
If the page is mapped to ASPX engine, then it will be served by that engine rite, So session also should be available. But why this is happening in my scenario ? When I am going wrong ? Please guide me.
|
|
|
|
|
Did you research about IRequiresSessionState marker interface?
|
|
|
|
|
Hello
I am developing an Web Applcation.
What is the maximum timeout for sessionState in web.config so that my Session variables doesn't get destroy.
Swapnil Bhavsar
|
|
|
|
|
By default is 20 minutes and rest u can set it upto life time.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
According to MS documentation:
The Timeout property cannot be set to a value greater than 525,600 minutes (1 year).
NOTE there is another thing you need to be concerned with. If you are running IIS 6.0 then you are also using an application pool. The application pool by default is set to recycle itself after like 27 hours. If the app pool is recycled you would lose all session information.
Hope that helps.
Ben
|
|
|
|
|
swapnilbhavsar wrote: Applcation
Web Application
swapnilbhavsar wrote: maximum timeout for sessionState in web.config so that my Session variables doesn't get destroy
That much high cost of memory and open idle sessions to remain.
|
|
|
|
|
The maximum timeout for sessions is much larger than any sane person would use.
The purpose of having a timeout on sessions, is that it removes the session objects from memory when they aren't used any more. If you have a very long timeout, you will have a lot of session objects in memory.
Memory is cheap, but it's still a limited resource. If the server starts to run out of memory, it gets tremendously slow.
---
single minded; short sighted; long gone;
|
|
|
|
|
hi
I h've created one sql table with a column "image data type". I want to retrive it and want to send this as an attachment using SendSMTPMail. Can anyone tell me , how to retrieve the image type from Sql server
thanks in advance
|
|
|
|
|
I am not cler with ur requirements.
what i had done is , while uploading the file i fetched the file extension using the fileinfo class. and stores it in database.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Hi...
Friends.
I want to get the length of multiple uploaded file from http header in asp.net ?
Do you have any solution or suggestions for that ?
Thanks in advance.
Regards,
Abhi
|
|
|
|
|
U have to controll this logically at ur end.
what i get in mind to store size of every file on one variable and get updated every time the file is uploaded to upstaging server.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Sorry, I can't get you !!
Can you please explain me this pardon !!
Thanks..
Regards,
Abhi
|
|
|
|
|
|
i was using the stored procedure , there i am usiong the two queries
select * from tablename
select is from table where name='name'
for that i am using the following code.
SqlConnection con;
con = new SqlConnection("database=db`;user id=sa;pwd=sa;server=localhost");
con.Open();
SqlCommand cmd;
SqlDataAdapter ad;
ad = new SqlDataAdapter("abc", con);
DataSet ds;
ds = new DataSet();
ad.Fill(ds);
if i use the select * form table queryt then the above code is working vey fine.
if i use both the queries , then the above cod eis not working.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Hi sonia, well nice to see u again in problem ha ha ha , kidding ok.
So can u plz specify what exact is ur requirement and what u need to do.
i am not clear abt what u r asking.
Regards
sulabh
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
If you have sql statements directly in your sqlcommand, it is expecting only one result set to return. If you are calling a stored procedure, which I think you are, then you can return multiple result sets. The down side is that .net version 1.1 doesn't handle multiple result sets. They only added that to .net 2.0. So if you are using .net 1.1 you will have to call the stored procedure. Then call another one to get the second result set.
Ben
|
|
|
|
|
Sonia Gupta wrote: con = new SqlConnection("database=db`;user id=sa;pwd=sa;server=localhost");
Connection String Syntax error...
Regards John
|
|
|
|
|
Hi,
Try this.
SqlConnection con;
con = new SqlConnection("database=db`;user id=sa;pwd=sa;server=localhost");
con.Open();
SqlCommand cmd;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "abc"; // Assuming abc is ur sp name;
cmd.Connection = con;
SqlDataAdapter ad = new SqlAdapter(cmd);
DataSet ds = new DataSet();
ad.Fill(ds);
Let me know if it works.
Laddie
|
|
|
|
|
I have a question how to abandon a session when user right clicks on task bar and selects close. I know how to abandon session in the case of user presses alt+ F4.
Share ur ideas with me
Thanks in advance,
surya
-- modified at 8:57 Wednesday 22nd August, 2007
|
|
|
|
|
I think as user closes the browser whether from taskbar or Alt+F4, the session automatically get expires.
Also u can do session null at global file with event Application_onStart
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|