|
One simple solution is Redirect to the same page after submitting the data. ie, in the submit button click use,
Response.Redirect(samepage)
|
|
|
|
|
Hi,
we are developing an application in ASP .NET. Every connected client is downloading a small file (about 12kb) every second. This file is changed every second by a multithreaded application.
We have dedicated server for this solution, but it performs really bad when there are about 100 clients connected.
My questions is: could this performance problem be caused by downloading this small file so often?
Thank you for your answer.
|
|
|
|
|
|
Does the file change each time or could you only download as required? Does it need to be every second? Does every client really need it that often?me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
Yes, it does change every second, and it is a business requirement that the client has to be notified of the change.
|
|
|
|
|
Hi, the requirement looks easily but i am not knowing how to achieve this.
i have two strings as below
string _mainstr = "INDI,GERM,ENGL,SCOT,BLAC,BANG,CHIN,JAPN";
string _substr = "CHIN,ENGL,INDI";
Now i want to remove all other country names from _mainstr which are not in _substr. But the order shouldn't be changed.
I am looking an ouput from _mainstr as follows
_mainstr = "INDI,ENGL,CHIN";
Here the order is important.
How can i get this in c#? Please give an ideaG. Satish
modified on Thursday, March 18, 2010 5:50 AM
|
|
|
|
|
First create function in database(for split these val;ues)
CREATE FUNCTION [dbo].[Split](@String varchar(8000), @Delimiter char(1))
returns @temptable TABLE (i int identity(1,1), items varchar(8000))
as
begin
declare @idx int
declare @slice varchar(8000)
select @idx = 1
if len(@String)<1 or @String is null return
while @idx!= 0
begin
set @idx = charindex(@Delimiter,@String)
if @idx!=0
set @slice = left(@String,@idx - 1)
else
set @slice = @String
if(len(@slice)>0)
insert into @temptable(Items) values(@slice)
set @String = right(@String,len(@String) - @idx)
if len(@String) = 0 break
end
return
after that create sp(that should be like that )
create storedprocedure [dbo].[sp_notINMain]
@_mainstr navrchar(1000),
@_substr nvarchra(1000)
begin
as
select a.items , b.items from dbo.split(@_mainstr,',') a inner join
dbo.split(@_substr,',') b on a.i = b.i where a.items not in(b.items) order by a.i asc
end
Try This may HELP......
|
|
|
|
|
Thanks for ur funcion. But its not meeting my criteria..it giving some wrong results. G. Satish
|
|
|
|
|
Satish - Developer wrote: How can i get this in c#?
This is not C# I know the language. I've read a book. - _Madmatt
|
|
|
|
|
use .Split off substr to create an array of searched for strings.
Iterate through this against _mainstr.
With a stringbuilder, if you've got a match, append this to a holding object.
At the end of it your stringbuilder will have the matched strings in the right order.
|
|
|
|
|
Pls Can you give code for this? I tried by i am not getting correct order. i am getting result what i have in substr.
string _mainstr = "INDI,GERM,ENGL,SCOT,BLAC,BANG,CHIN,JAPN";
string _substr = "CHIN,ENGL,INDI";
ArrayList ary = new ArrayList();
string[] sub = _substr.Split(',');
for (int i = 0; i < sub.Length; i++)
{
if (_mainstr.Contains(sub[i].ToString()))
{
ary.Add(sub[i]);
}
}
G. Satish
|
|
|
|
|
Right having thought about this a bit more, I realize my pseudo code was a bit off. You're close though, you just need to split _mainstr into an array too then iterate through that and iterate through your _substr array too so:
Loop through _mainstr array
Within each loop, loop through _substr array and see if it's there, if so, add to holding object.
Holding object at the end = matched items in the original order.
|
|
|
|
|
string _mainstr = "INDI,GERM,ENGL,SCOT,BLAC,BANG,CHIN,JAPN";
string _substr = "CHIN,ENGL,INDI";
List<string> main = new List<string>(_mainstr.Split(','));
List<string> sub = new List<string>(_substr.Split(','));
main = main.FindAll(delegate(string s) { return sub.Contains(s); }); I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thank you. But the code u have given is in DotNet 3.0
I am working in DotNet 2.0. Please give code which works in 2.0. Thank youG. Satish
|
|
|
|
|
You should have specified the version of the framework you are working with initially. You're on your own. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
based on the user type from data base i have to give permissions on menu control .how to give permissions can you give me example which helps me
|
|
|
|
|
to give access permission on menu control based on user type from database using asp.net
You should add session whene login user after login when he click on menu control u will check permission according to session for that user.
|
|
|
|
|
I'm assuming you mean filter the menu by user roles?
If so, [Click Here] oooo, the Jedi's will feel this one....
|
|
|
|
|
hello all
i want to scan document using twain controlx in asp.net with vb.net.
but i dont know what is dll file for twain controlx.
and also how to scan document in vb.net.
plzzzzzzzzzz...........help me its urgent.modified on Thursday, March 18, 2010 4:29 AM
|
|
|
|
|
Hi,
You can try Dynamic .NET TWAIN to acquire images from your scanner, cameras and other TWAIN compatible devices. Dynamic .NET TWAIN is a .NET component developed by Dynamsoft.
To learn more about Dynamic .NET TWAIN, please go to:
http://www.dynamsoft.com/Products/.Net-TWAIN-Scanner.aspx
www.dynamsoft.com
the leading developer of version control and issue tracking software
|
|
|
|
|
Hi everyone,
I have one textbox which needs to allows only values with >0. if it is 0 then, it should be return error msg.
Pls anyone help!!!Nothing is Impossible. Keep always Smiling...
|
|
|
|
|
|
You can use the following regular expression to validate it.
"^[0-9]*[1-9][0-9]*$"
modified 27-May-14 4:40am.
|
|
|
|
|
hi,
i'm in a trouble to download formview/Gridview as PDF. ie; i have a formview, which is filled with data including unicode & image. when i click a button, the formview should download as pdf. can any one help me to sortout this.
i tried iTextsharp, Pdfclown, etc.. But it will download only Enlgish, not unicode & images.
imp: i want to download the Entire Formview
its urgent my dear. please help me.
Thanks in advance.
|
|
|
|
|
Hello All:
I'm trying to stretch a background image (rather than have it tile repeatedly), but I'm not sure how to do this. I'm using the Style Builder in VS2005, and it has every option except stretching the image. Any advice you can offer is greatly appreciated.
Andre=======================
Every experience in life is a lesson to be learned
A. Stevens
B.S., Computer Science
|
|
|
|