|
Hi,
Before moving to the next page you should save selected values in session and use that to get values when come back to the previous page.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
hi
'
i like to know how the values are stored in session and how do i retrive it...
regards
devkranth
|
|
|
|
|
Thats your wish...
You can store by any type which is easy to you.
Eg:
You can store the SelectedValue(s) it as a string with delimiter like "2, 15, 20, 25" where comma(,) is the delimiter. You can split it when you want..
|
|
|
|
|
Hello
I want to save large data in database. This data is string and may be contains up to 2 pages.
-> Which field i should choose for it in SqlServer 2005?
-> I want to save line breaks (Enter Key) and retrive the text from database like i saved it before to database, Somebody says i should save it in html format! How can i do it?
Tanx
|
|
|
|
|
In SqlServer 2005 You can use varchar(max), or nvarchar(max) for this purpose.
It is same as varchar or nvarchar, only difference is that it can store large value.
|
|
|
|
|
hello freshonlineMax,
do you want to save HTML page ???
if yes then use BLOB method to save the data and use the image field in SQLserver the size of this field is 16 bit
i think it will helpful for U, if you want to save HTML page
regards,
-koolprasad2003
N-Joy
|
|
|
|
|
Save that in 'Text' format. You can save upto many pages. You can retrieve back the original thing..
|
|
|
|
|
i m new to SOAP .. i ve developed web server ...with the methods..shown below
while i m using vc++ calient to call this method...
for method Addition ,i metting result 0 everytime
for method MyMethod , i m getting "Inside MYMehod"; is shown not str+"Inside MYMehod";
i ve using mssop toolkint 3.0
web services developed in .NET framework
for .NET c# client but not for vc++ client why?????????????
[WebMethod]
public double Additon(double a,double b)
{
return a+b;
}
[WebMethod]
public string MyMethod(string str)
{
return str + "Inside MYMehod";
}
|
|
|
|
|
Hi Everyone,
I've got an C# ASP.NET website which unreal..... But I have one small problem. I don't know how to implement a three second timer to run in the background of my webpage. I want a label to be displayed in red for three seconds and change to blue one the three seconds are up!
Does anyone have sample code or ideas to help implement this?
Thanks in advance!
Michael
|
|
|
|
|
Could use javascript:
<script type="text/javascript">
setTimeout( "setToBlue()", 3000 );
function setToBlue()
{
var label = document.getElementById( "your_label_id" );
label.style.color = "blue";
}
</script>
This will run when the page loads.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Legend with a few mods it worked like a charm...... thanks for all your help!!
Take care,
Michael
|
|
|
|
|
Here it goes....
I have some receipt logs that are written by my POS software. At the same time the log is written there is an entry made in my database (Access) with the path and receipt ID for the entry. The entry in the database for example looks like this; each item is a column in the database.
Trans Number: D2073
Log File: Logs\DRLog032005I.log
Receipt: D38592207362963
The receipt log file that corresponds to this is located in the Logs directory and is file name DRLog032005I.log
Ok now the fun stuff
Here is a clipping from one of my receipt logs this is actually two receipts one of them corresponds to the above mentioned receipt the other is the sequential log entry. As you can see there is a lead in and lead out for each receipt.
What I am trying to do is display a single receipt from the log on a page for the purpose of printing. I already have the database connection established and I know how to get the information from the database to the fields that I need to. What I do not know is how to call in the information from the log files. The information on reading text files using ASP "readfile.asp" is pretty good but I am not sure how to modify it so that it just displays the single receipt information. Any help will be greatly appreciated
Ex. lead in "<receipt>D38592207362963"
Ex. lead out "D38592207362963"
<++++++++++++++++++++++++++++++++++++++>
<receipt>D38592207362963
RETURNS, EXCHANGES, AND CREDITS
WARRANTED WITHIN 10 DAYS OF SALE,
AND ONLY IF RECEIPT IS PRESENTED!
THANK YOU!
Transaction#: D2073
CLERK: CORY
Date: 08/28/2005 Time: 08:18:45 AM
Due Date: 09/10/2005
*** SALE ***
Bill To:
Customer # ****
CORY *****
P O BOX ***
GRAY, LA *****
***-***-****
____________________________________
5109WB 6V UTILITY LANTERN
6373518
2.00 EA @ $5.99 T $11.98
074196003077
11863 6 GAL WATER CAN
6559165
2.00 EA @ $10.15 T $20.30
Subtotal: $32.28
4% Louisiana State Tax: $1.29
4.5% Terrebonne Parish Tax: $1.45
TOTAL: $35.02
INVOICE: $35.02
CHANGE: $0.00
(X)__________________________________
Authorized Signature
A Finance Charge of 1.5% per month
applies to all past due invoices
.-----------------------------------.
HOURS = 7-6 M-F, 8-5 SAT, 8-3 SUN
***-***-****
*************** HOUMA, LA *****
D38592207362963
<++++++++++++++++++++++++++++++++++++++>
<receipt>D38592208775926
RETURNS, EXCHANGES, AND CREDITS
WARRANTED WITHIN 10 DAYS OF SALE,
AND ONLY IF RECEIPT IS PRESENTED!
THANK YOU!
Transaction#: D2087
CLERK: CODY
Date: 08/28/2005 Time: 10:55:58 AM
Due Date: 09/10/2005
*** SALE ***
Bill To:
Customer # ****
AMERICAN MACHINE & MFG., LLC
P O BOX ****
HOUMA, LA *****
***-***-****
____________________________________
5109WB 6V UTILITY LANTERN
6373518
3.00 EA @ $5.99 T $17.97
074196003077
ONE PRO CELL C BATTERY
PCCB
24.00 EA @ $1.014 T $24.34
Subtotal: $42.31
4% Louisiana State Tax: $1.69
4.5% Terrebonne Parish Tax: $1.90
TOTAL: $45.90
INVOICE: $45.90
CHANGE: $0.00
(X)__________________________________
Authorized Signature
A Finance Charge of 1.5% per month
applies to all past due invoices
.-----------------------------------.
HOURS = 7-6 M-F, 8-5 SAT, 8-3 SUN
***-***-****
***************** HOUMA, LA *****
D38592208775926
|
|
|
|
|
Use a TextReader, or other object, to read each line from the beginning ID to the end ID.
something like this
do<br />
{ <br />
string line = reader.ReadLine() <br />
) while( line != "D38592207362963" )
IMO a better solution would be to forgo the files and Access database. Use SQL Server, SQL Express is free, or SQL Server Compact if you need a smaller footprint. You will get better performance, it will be extensible and structuring the data will allow for more effecient searching and reporting.
only two letters away from being an asset
|
|
|
|
|
Dim TextStream
Set TextStream = file.OpenAsTextStream(ForReading, TristateUseDefault)
Do Until TextStream.readline = "D38592207362963"
Dim LineA
LineA = TextStream.readline
LineA = LineA & vbCRLF
Response.write LineA
Loop
I am trying this but it only displays every other line?????
-- modified at 9:15 Wednesday 6th June, 2007
|
|
|
|
|
This seems to work for me.
using(StreamReader sr = new StreamReader("receipt.txt"))<br />
{<br />
sr.ReadLine();<br />
sr.ReadLine();<br />
<br />
string Line;<br />
do<br />
{<br />
} while( (Line = sr.ReadLine()) != null && Line.Trim().Contains("D38592207362963") == false );<br />
}
I don't do VB so you are on your own to translate it.
I would still advise to rearchitect the application away from files and Access
only two letters away from being an asset
|
|
|
|
|
I would love to restructure but the database I am accessing is put together by my software vendor for the POS and accounts receivable software. I am not sure why they do not go to SQL but for now it is what I have to work with. Thanks for the help thus far.
Please look at my new post about TextStream
|
|
|
|
|
Hi,
I am developing a server control where I have a property named UploadFolder. This Upload folder will be the virtual path starting with "~/" within the Web Application. Now as I did not find any DesignTime Editor for editing Folder Path although I found for URLEditor or IMAGEURL Editor etc, I wanted to develop my own Windows Form oriented Design Time folder path editor. In my Windows Form, I have used FolderBrowser Dialog but I want to set the root directory of that dialog to the Web Application's path. I dont see any method to get the Web Application Path from that Windows Form. Can you please help me about it.
Thanks a loooooot.
|
|
|
|
|
I have 10 textboxes and now I have to validate them using Required Field Validator. Is there any way to validate them without using 10 required field validators(i.e. only using one). Or are there any better ideas.
|
|
|
|
|
|
Hi all,
I have an usercontrol where i gave a radiobutton list.(rblTest)
I am using this usercontrol in my aspx page.
RadioButtonList rblTest= (System.Web.UI.WebControls.RadioButtonList)myControl1.FindControl("rblTest");<br />
I need to handle onselectindexchanged method of radiobutton list in aspx page.
How to do that.
Plz give ur suggestions.
Thanks in advance
cheers
sangeet
|
|
|
|
|
To do that you must first declare in your "hosting" aspx page a procedure which will handle an event:
public void RadioButtonIndexChangedProc(object sender, System.EventArgs e)<br />
{<br />
RadioButtonList rbl = (RadioButtonList) sender;<br />
}
Next in the user control, in the SelectedIndexChange event call that procedure:
private void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)<br />
{<br />
WebForm1 page = (WebForm1) Page;<br />
page.RadioButtonIndexChangedProc(sender, e);<br />
}
As you can see, you can access your hosting aspx page by using Page object, and by casting it to appropriate type (class of your hosting page, in my case WebForm1 ) you have access to all public class members.
In case of reusing an usercontrol on diffrent web pages think about implementing one base class or implementing an Interface which will handle RadioButtonIndexChange by every class which uses your usercontrol.
--
Mariusz 'mAv' Wójcik
master e-software engineer
|
|
|
|
|
OKi,
in addition to my above answer, there is a solution which uses interface.
First, we implement an Interface:
public interface IRadioButtonListEvent<br />
{<br />
void RadioButtonIndexChangedProc(object sender, System.EventArgs e);<br />
}
As you can see, our interface implements just one method, which will be called whenever selected item index changes.
Now, in the User Control, RadioButtonList1_SelectedIndexChanged should look like this:
private void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)<br />
{<br />
IRadioButtonListEvent iPage = (IRadioButtonListEvent) Page;<br />
iPage.RadioButtonIndexChangedProc(sender, e);<br />
}<br />
And finally, code for hosting web page. As i mentioned above, page must implement an IRadioButtonListEvent interface.
public class WebForm1 : System.Web.UI.Page, IRadioButtonListEvent<br />
...<br />
<br />
public void RadioButtonIndexChangedProc(object sender, System.EventArgs e)<br />
{<br />
RadioButtonList rbl = (RadioButtonList) sender;<br />
}
--
Mariusz 'mAv' Wójcik
master e-software engineer
|
|
|
|
|
Both of your solutions couple the user control and page together very strongly, which limits the flexiblity and reuse.
only two letters away from being an asset
|
|
|
|
|
Handle the onselectindexchanged event in your user control and create an event in your user control that any page can subscribe to that reflects the onselectindexchanged event. A technique called event bubbling.
http://www.odetocode.com/Articles/94.aspx[^]
only two letters away from being an asset
|
|
|
|
|
Hi in my form using crystalreportviewer i dispalyed my crystal form..,
And in print button i said this code...,
report.SetDatabaseLogon("sa", "pwd", "server", "Databasename")
report.PrintToPrinter(1, False, 0, 0)
If i click the print button process is going on..,
But in between process will stop its not printing the page...,
Plz any one solve my probs...,
Magi
|
|
|
|