|
berd12 wrote: So basically, what i'm trying to do is i'm logging in to that page using my own page. The pop-up should not be shown anymore since i have my custom log-in controls.
Is it possible to get the control names/id of the pop-up box,
If you're talking about the credentials box put up by the browser, no. That pop up box is no part of the web page. There's no way for your ASP.NET (which runs solely on the web server!) code to put anything in the browsers login box on the client side.
berd12 wrote: I found an article that this one is possible using the WebBrowser control but it seemed that this control is only available in windows applications.
True. The web browser control doesn't exist in ASP.NET apps, for obvious reasons.
Web Forms (ASP.NET) apps run their code entirely on the server, NOT on the client. Your ASP.NET code cannot establish a login session for another web site that doesn't run on your server.
|
|
|
|
|
I'm writing a .NET version of Panorama (it changes your backgrounds in win98 but has Issues on XP/Vista -- i dont maintain it... i just like it)
I have to handle It as a single instance application because i call the "ChangeDesktopBackground" command in user32.dll alot -- anywhere from 6 SECONDS to 4 HOURS... and i dont want a user going crazy because the desktop just changed 3935974958607367 times... it takes some doing too...
I was considering DDE, but its dead. OLE automation is near imposible without killing the filesize (its 200kb right now -- and only takes up 400kb in memory.)
I would like to have a command line param, say -a, that adds files to a listbox.
Heres how i have it set up:
FormMain
FormMain.Desks(ListView)
FormMain.AddSingle(Button)
FormMain.AddDirectory(button)
FormMain.RemoveItem(button)
formMain.clearAllItems(button)
FormMain.Timeout(spinCtl)
FormMain.TimoutTimer(Timer)
FormMain......
I want to be able to have it set up so that when the user calls something like
"PanoNet.exe -a C:\Epic Files\Some File.jpg" "C:\Mpre FIles\Some Other FIle.BMP" the new instance tells the old instance to add the two files to the top of the end of FormMain.Desks.Items
Can this be done?
"Pinky, are you thinking what i'm thinking?"
"I Dunno brain, who really came up with the idea for cheeze sticks?"
"... apparently not ..."
|
|
|
|
|
Yeah, it can be done. Just search the articles for "single instance" and you'll find a few that describe passing data back to the original instance of the app.
You may want to check into .NET Remoting (older) or WCF (newer) if using the .NET Framework 3.0. Basically, your app is exposing a server that a new instance of the app connects to as a client.
|
|
|
|
|
Hi. I have 2 tables named 24HourTemplate (with a primary key 24HourTemplateName) and a table called GenreTemplate(with a primary key TemplateName) joined to a composite table named 24HourGenreTemplate(both the Field 24HourTemplateName and TemplateName are primary keys for this table) The problem is when I update the Composite table it gives an error Message saying that Template name is constrained to being unique. It doesn't update obviously then. it is correct for the TemplateName and 24HourTemplateName fields to be unique but that is only for the tables 24HourTemplate and GenreTemplate. There will be duplicate values in the composite table. What am i doing wrong? I'm using an access 2002 database in vb.net2005. (each 24 hour template will have 24 genre templates applied to it)
MrOizo
|
|
|
|
|
Mr Oizo wrote: both the Field 24HourTemplateName and TemplateName are primary keys for this table
- Do you mean a composite primary key comprising of 24HourTemplateName,TemplateName.
Mr Oizo wrote: Template name is constrained to being unique
Sounds to me like you need to understand database design, as a primary key is unique i.e. you cannot have a non unique primary key.
It could be a foreign key as it joins to 24HourTemplate and GenreTemplate.
You always pass failure on the way to success.
|
|
|
|
|
Hi yes it must be a composite primary key. sorry. It holds the primary keys from 2 tables:"GenreTemplate" and "24HourTemplate". This "composite table" named "24HourGenreTemplate" has only the 2 primary keys from the other tables(set as the primary key) and another field called "time". I have other tables with the same structure and relationhips as this that do updat fine. this just doesn't want to? do i need to create a different primary key for the composite table?
Mr Oizo
|
|
|
|
|
Ok I understand now - what I would ask is are you absolutely sure that the primary keys you are creating in 24HourGenreTemplate are unique?
Output the rows, via debug.writeline, inserted into 24HourGenreTemplate to double check that the two fields that make up the primary key only appear once.
for instance:
if the primary key is comprised of field1,field2
field1 field2 field3
dog big alsatian
cat small persian
dog small border
dog big bloodhound
The rules set up for a primary key are broken as the 1st and 4th row have identical keys.
Does this help?
You always pass failure on the way to success.
|
|
|
|
|
Well yes. Thats exactly the problem.the only thing is that it will be possible that those 2 keys apear twice if not more times in a table.One "genretemplate" may be used for various time slots on the "24hourGenretemplate" table. the "24hourtemplate" column thus occurs 24 times(all rows) in this table. so that is the problem. What if I use the other field in the table called "time" and make it part of the composite key so that "time","24Hourtemplate" and "GenreTemplate" are now primarykeys. Each time slot can only occur once per row running from 00:00 to 23:00. Tis should fix it? thanks for the help
Mr Oizo
mr oizo
|
|
|
|
|
You're welcome
You always pass failure on the way to success.
|
|
|
|
|
I am actually working on a Distributed Web Crawler and implemented the Breadth-First Search Model and each URL discovered will going to be downloaded in a new thread but I'm not sure whether this will effect the performance or will increase the performance need your suggestions.
AliAmjad (MCP)
|
|
|
|
|
Hi,
as a first approximation, this is what you could do:
- write and run the code to use a single thread; observe the CPU load (with Task Manager)
as a percentage.
- The inverse number is the number of threads you want, so if it is close to 100% extra
threads won't bring you anything; if e.g. it is near 25% using four threads MIGHT increase
the performance by four, bringing the CPU load to 100%. More threads than that won't help you.
Remarks:
1.
if the above would tell you you need a lot of threads, then don't do it; something must be
wrong in your code (e.g. you have some Thread.Sleep() calls included, or are blocked by
something else; solve that first).
2.
most often you don't need many threads doing similar things; 2 to 4 should suffice;
as a rule of thumb don't go beyond 2 per processor (assuming you have a multi-core or some
hyperthreading CPU).
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi
i want to know which one is better to use regularly either data set or data reader ?
Thanks
bye
|
|
|
|
|
It depends on your requirements if you want to display as well as alter the data you will use Dataset but if you only want to display data then should use Data Reader because its a Forward-Only Read-Only model and increase the performance of the application.
|
|
|
|
|
You can modify data without using a DataSet. In face, I very rarely use DataSets at all. Too large and clunky.
|
|
|
|
|
hi
thanks for immediate reply. but for only data display we can use datagridview . then what will be the difference betn datagridview & data set
Thanks
bye
|
|
|
|
|
DataGridView is a presentation mechanism.
DataSet is an internal storage structure.
|
|
|
|
|
Hi
A Dataset cannot be Compared with a datagrid view. they are two different thing in different categories. a Dataset present data to the datagridview,a datareader present data to datagridview. as the Guy said. if you dont want to update the data, if you only want to view the data, and only in the fowardonly mode, you just have to go for datareader. but id you are going to manupilate the data. use dataset. Go here for more info
http://www.dotnetspider.com/kb/Article1078.aspx[^]
Thank
i wish it helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
hi
can i directly update data table from execution of sql query ? or at the time of query execution can i store o/p directly into table?
Thanks
bye
|
|
|
|
|
nilam11 wrote: can i directly update data table from execution of sql query ?
By "data table" do you mean the table in the database, or the "DataTable" object in .NET?
nilam11 wrote: or at the time of query execution can i store o/p directly into table?
What is "o/p"?
You can run any SQL through the SqlCommand object. If you want results back use ExecuteReader() . If you don't expect results back use ExecuteNonQuery()
|
|
|
|
|
hi
thanks. i want to store data table of database from query's o/p whatever will come.
Thanks
bye
|
|
|
|
|
nilam11 wrote: query's o/p
I asked this before: What is "o/p"? To me it means Original Poster. That is obviously not correct in this context.
|
|
|
|
|
i have made report of 115 query and it's working well
but the problem here is the report is tooooooo slow
what can i do please help
|
|
|
|
|
the reason its taking so long to work is that you are doing 115 INDIVIDUAL queries... thats 115 new connections to a server and 115 questions of the server.... thats a LOT of data....
Consider using a BackroundWorker of some kind, OR using a berrer query structure... thats why its taking so long.
to make it simpler, think of a query as a conversation.
You make a query to a server, you start a whole NEW converstion with it.
you ask one question ( ie select all from * where foo equals bar)
you end the conversation.
repeat 115 times.
better way to do it:
connect to server.
ask it "select from * where ( foo = bar) OR (baz = bar) OR ...."
parse that data.
end connection.
no repeat.
you only have to understand the data that you are being fed. but the only thing you have to do once is ask the query... not 115 times because you've asked it a really well refined question that can easily be answered.
Hope that helps.
----
Morgan Gangwere
Lead programmer, Unknown Software
"Pinky, are you thinking what im thinking?"
"I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?"
"You want me to calculate that? or should we take over the world?"
"ooh! OooooOOOooH! lets find out!"
|
|
|
|
|
thanks so much for ur help
but iam beginner so i would like to see an example because i can't get all ur reply
any way i will give one of my sql statement but u have to know that each sql statement is different from the other
here is the example
<br />
<br />
Dim s As String<br />
Call conn()<br />
''''''''''''''''''''''''''''<br />
s = "drop view sanad1"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader()<br />
dr.Close()<br />
'''''''''''''''''''''''''''''''''''''''<br />
s = "create view sanad1 as select number from sanad where number = '" + TextBox97.Text + "' "<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader<br />
dr.Close()<br />
s = 0<br />
<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
Call conn()<br />
''''''''''''''''''''''''''''<br />
s = "drop view sanad2"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader()<br />
dr.Close()<br />
'''''''''''''''''''''''''''''''''''''''<br />
s = "create view sanad2 as select topic from sanad where number = '" + TextBox97.Text + "' "<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader<br />
dr.Close()<br />
s = 0<br />
so please tell me what should i do practicaly
thanks so much
|
|
|
|
|
Hi, I am creating a login for a project at college and I really do have no clue where to start. My brief is that I need to access a database for login purposes and set groups for permisions to access different areas in my program. I looked at this source http://www.codeproject.com/vb/net/Login_Control.asp but when opening I got errors so i couldnt see the structure of the code.
Any links etc would be really appreciated. Thanks.
|
|
|
|