|
After I populate data from BusinessLogicLayer into a textbox, then I modify the text in textbox, click on submit button, the data is saved into the database is the old value, not the modified one. Both textbox and submit button are web server control.
Please help
eric
|
|
|
|
|
Hi eric_tran,
Do you populate the data into textbox in Page load event without checking Page.IsPostback?
<< >>
|
|
|
|
|
Ah, yes, I populate data into textbox in Page load event, then save modified text in Button click event.
So what should I do?
Thanks for your reply
eric
|
|
|
|
|
just populate data when Page.IsPoskback = False...You just debug it to verify...Without that block, everytime user click on the button, the old data is populated again into textbox ==> that's why you always get old data...
<< >>
|
|
|
|
|
Hello enjoycrack,
That's fantastic. You are right. Thank you very much.
I got it. I spent 5 hours on fixing this bug.
Have a nice day.
eric
|
|
|
|
|
You're welcome...Thanks nice day too!
<< >>
|
|
|
|
|
I have 4 pages in my web application: login page, report parameter page, Report1 page and Report2 page. Report2 page is displayed when hyperlink values on Report1 is clicked. Actually Report2 displays details for data shown on Report1. I want to restrict the user to directly view Report2 by typing in URL of that page after he has logged in. Please let me know the solution.
Regards.
|
|
|
|
|
Is it ASP or ASP.NET ? You want to only show report2 after report1 ? You could store a value in the session and clear it on all pages but report1. If it's not set, the report2 page redirects.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
How can i use Process.Start that when i right click or click in a LinkButton the Internet Explorer opens in new window
Thanks in advance
|
|
|
|
|
Do you want to start a process at client side?
<< >>
|
|
|
|
|
When I first login there is a error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding., I add a <httpRuntime executionTimeout="120" maxRequestLength="4096" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" /> in web.config file, however the error still not be fixed.
Regards
-- modified at 12:26 Saturday 19th May, 2007
|
|
|
|
|
How to do String Concatenation in asp.net? I want with && function. Can anybody help please.
|
|
|
|
|
Hi,
You can use String.Concat
|
|
|
|
|
The String.Concat method works the same from any language, as it's part of the framework. Example:
string s = String.Concat("We have ", products.Count.ToString(), " products.");
The specific programming language that you use has alternative ways of writing this. Example:
string s = "We have " + products.Count.ToString() + " products.";
These two examples actually produce the exact same code.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
Hello there,
I need to monitor changes made to a certain file from ASP.NET website application. I decided to accomplish this using System.IO.FileSystemWatcher. Currently I am having the following problems
1. I can't make my watcher monitor a single file not just the whole folder content.
2. Even if I try the whole-folder-monitoring scenario it turns out that the Change event fires 5 times instead of 1. Any magic behind this number?
Here's the source code inside my Global.asax file. Commented lines include adjustments I tried to enable monitoring specific file.
1 void Application_Start(object sender, EventArgs e) <br />
2 {<br />
3
4 <br />
5 <br />
6 <br />
7 System.IO.FileSystemWatcher __file_watcher = new System.IO.FileSystemWatcher();<br />
8 Application.Add("AdConfigurationWatcher",__file_watcher);<br />
9 __file_watcher.Path = Server.MapPath("~/");<br />
10 __file_watcher.IncludeSubdirectories = false;<br />
11 __file_watcher.NotifyFilter = System.IO.NotifyFilters.LastWrite;<br />
12
13 <br />
14 <br />
15 __file_watcher.Changed += new System.IO.FileSystemEventHandler(__file_watcher_Changed);<br />
16 <br />
17 __file_watcher.EnableRaisingEvents = true;<br />
18 }<br />
19 <br />
20 void __file_watcher_Changed(object sender, System.IO.FileSystemEventArgs e)<br />
21 {<br />
22
23 System.IO.WatcherChangeTypes c = e.ChangeType;<br />
24 }<br />
25 <br />
26 void Application_End(object sender, EventArgs e) <br />
27 {<br />
28
29 System.IO.FileSystemWatcher __file_watcher = Application["AdConfigurationWatcher"] as System.IO.FileSystemWatcher;<br />
30 Application.Remove("AdConfigurationWatcher");<br />
31 __file_watcher.Dispose();<br />
32 }
|
|
|
|
|
Hi All,
I m displaying my data on a datagrid. There is a field Stock Quantity, I want the record of 0 to be highlight when it take data from DB. How can I do.For example
SKU MFR_Code Stock_Quantity
KU KIJ 100
IO IKI 50
IOP SAF 0
The third record IOP should be in Red. What should I do. Pls help me. Its very urgent.
Thanks in advance.
|
|
|
|
|
You need to do this using itemdatabound event....
Lets work it Out.........!
|
|
|
|
|
Whats is this dear, there is nothing. Please read it.
|
|
|
|
|
IMO, he means that you use that event to customize the gridrow's display ...
<< >>
|
|
|
|
|
Hi Friend !!!!
pls Help me !! I have been wondering with code !
i have a table in that table there r two fields latitude and longitude with more than 50 records.
i have to retrive latitude and longitude values (First Ten Records) from database(SqlServer) through javascript in asp.net.I have a GoogleMap on my Form.
after getting this coordinates for ten records,
i have to display the position with 10 markers on the Google Map for ten records , according to their coordinates(Lat,Long).
so pls help me!!!!!!!!! to come out of this code
Thanks
Ashok Thakur
|
|
|
|
|
You might look into AJAX concept...
<< >>
|
|
|
|
|
Hi enjoycrack
Thanks for helping me.
i was wondering because of this ajax concept.
Thanks a lot!!!!!!!!!!!1
Ashok Thakur
|
|
|
|
|
Hi guys,
I am programming web.sitemap for my web application.I am using one default page on which i am retrieving the content for the menus from the database with the help of querystring.
The problem is I am unable to achieve the sitemap for my application.The <asp:SiteMapPath> control is unable to produce the navigating path.
if anybody has suggestions for this problem please reply.
Thanks
Jith
|
|
|
|
|
I am trying to do a search. When I type a character inside the textbox it should take all the feild value which starts with that character. Below code it is not showing any error, but not binding to the datagrid.
string s = "%S" + TextBox5.Text + "%";
string d = "SELECT field1, field2,... FROM OUTSTANDING WHERE field1 LIKE '"+ s +"'";
try{
OdbcCommand CMD = new OdbcCommand(d, c);
DataSet DT = new DataSet();
c.Open();
OdbcDataAdapter a = new OdbcDataAdapter(CMD);
CMD.ExecuteNonQuery();
a.Fill(DT, Tablename);
GridView1.DataSource = DT;
GridView1.DataBind();
}
|
|
|
|