|
OK - what have you got so far? How are you representing your tables? What diagramming methods are you using?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi, I have a web application with a single page, where I put a textbox in that form. Then I build the project. Now I have another web application and want the previous web application page in this application. I mean I want to show the previous application's page into my current application's page as a user control.
Pankaj
|
|
|
|
|
Create a userControl and add what ever controls you want, and from your Solution Explorer Drag it and Drop it in your host page , it will be registered and you can use it.
Simple
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Thanks for your replay. But this is not my problem. I have a web application not class library. And I have to show this web application form to my new web application as a control.
Pankaj
|
|
|
|
|
Hello,
Win App:
takes a value from a textbox1 and send it throw parameter to a method in the website called WebDisplay(textbox1.text)
Web App:
WebDisplay method recives the parameter.
so how can i do that..?
thanks!
|
|
|
|
|
Why Dont you Create a Web service that can be Consume by your Windows Application
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified on Tuesday, June 30, 2009 8:50 AM
|
|
|
|
|
sry, can u explain more ?
|
|
|
|
|
Sorry i wrote a rotten English there
ok what you should do is to create a Web service on your Web Application and in your windows Application Add a WEb reference to that Web Service and in your C# code Consume the Web service.
Tell me if you need example code.
Hope this Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Ok..
can u give me a simple project to do that.
thanks for help ..
|
|
|
|
|
Its Easy as you said you have a Web Application. in your Web Application Add a New project(Web Service).
You will find it has code like this
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
namespace WebService1
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
as you can see there is example Function,
now change it to your needs , now this will be on your Web Application build it and make sure it has no Errors , in your Windows Application go to your References and right click and Add web Reference and Browse to your Web service, if you are doing this locally it will automatically show a list of web services that you created. choose one and in your Windows Appliction you will access the Web function as a Function that is created locally.
Hope this Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
if i connect two PCs throw cross cable ..
and i but the web app in one, and the win app in the 2nd one..
is it the same to add refrence from the web..??
|
|
|
|
|
Yes and Enter the Address of the Web Service. Remember After you created the Web service you must test it and you will see the URL that you can use consume it.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
I have a template file in a folder " c:\template_folder".
At runtime, I will create a new folder " c:\new_folder" and wish to copy the template file to the new_folder only if the file doesnt exist.
description:
for the first time, I will copy the template file to the new_folder and rename it with username... so that after first time the loop finishes, i will have 8 excel files with username as the name of the each file.
for the second loop, if I have to copy the template file to new_folder and rename it to the username, if the file with the user name already exists, then it shouldnt copy the file to the folder.
I am addin the snippet of the code for reference.
foreach (FileInfo fi in templateFile)
{
string oldfilename = null;
string newfilename = null;
if (dir.Exists)
{
fi.CopyTo(Path.Combine(dir.ToString(), fi.Name));
FileInfo fileName = new FileInfo(fi.Name);
oldfilename = Path.Combine(dir.ToString(), fileName.ToString());
newfilename = Path.Combine(dir.ToString(), tempUserName + " " + "E" + tempUserID + " VIPv7.0.xls");
//if( !dir.ToString().Contains(newfilename))
foreach( FileInfo fileList in fileNames)
{
if (fileList.Exists == false)
File.Move(oldfilename, newfilename);
}
}
}
please help me in working this.
thanks
ramm
|
|
|
|
|
Hmmm...
if(!File.Exists("filepath"))
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi Experts
i Have Data of 2 millions of record i am using C#.NET and SQL Server 2005
then suggest me what i am using either sqldatareader or SQLdataadapter
which is faster.
Thank u
Dinesh
|
|
|
|
|
Rather than us telling you, you should attempt to find this out for yourself. While I think that the DataReader will be faster, you don't know why this is my opinion. You don't know that it's because the DataReader is a firehose cursor, and you can't tell whether I'm right or absolutely full of it.
By attempting to solve this yourself, you will develop your critical thinking and analytical skills which will make you better able to evaluate whether or not you are being given valid advice. This, in turn, will help you grow as a developer. Alternatively, you could stay a cut and paste monkey for the rest of your life, and just get others to spoonfeed you information. The choice is yours.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Before discussing the comparision, may I ask you something. What are you gonna do with 2 Million record at the application level?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: Before discussing the comparision, may I ask you something. What are you gonna do with 2 Million record at the application level?
Second that. Anyway, you may have a good reason for this so...I assume that DataReader will be faster, but I don't really have DB with 2 Million records to verify that
|
|
|
|
|
Obviously the First thing you should remember
1) retrieve the Fields that your Application will need
2) Retrieve the number of records by using where Clause
3) Use Dataset or Datatable if you are going to Update the Data else Datareader.
but please Be specific, what are you going to do with the Data? You cant Display 1000 000 in gridiew that will be a bad idead and Design.
Hope it Helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
1. Pulling out 2 million records at once means your application needs redesign.
2. If there is an unavoidable reason to do this, then choose depending on what you will do with those records.
For instance, if you are going to write them to some other place, use datareader.
Your post reminded me of an aticle I had read some time back. Here[^] it is, if it helps.
|
|
|
|
|
Here's a hint: the DataAdapter uses a DataReader to do all the work (same with ExecuteScalar and ExecuteQuery).
|
|
|
|
|
Hi Guys,
My .net 3.5 solution contains a wpf application and a class library project (dll).
The dll is referenced (add reference --> projects tab) by the wpf app.
I added a web reference to the class library and configured its "URL Behavior" to dynamic,
so that when I deploy the application I could replace the WS's url in the app setting.
An app.config file was automatically generated in the class library project, containing the settings for the project:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MyDll.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<system.serviceModel>
<bindings />
<client />
</system.serviceModel>
<applicationSettings>
<MyDll.Properties.Settings>
<setting name="MyDll_MyServices_DataService"
serializeAs="String">
<value>http:
</setting>
</MyDll.Properties.Settings>
</applicationSettings>
</configuration>
When I build the solution, only the wpf.exe.config file is created - the dll.config
file is not copied to the output directory.
I thought maybe the settings were merged but the wpf.exe.config file doesn't contain
the above settings from the class library app.config.
Bottom line - If the dll config file is not copied / merged to the exe config, I can't change the url of the WS!
The code in the class library will always use the default values since it won't find it in and application setting.
I know I can manually copy the dll's settings section from its app.config file
to the WPF's app.config file, but this sounds like a bad idea.
What is the right way to complete my goal?
Thanks,
Shaul
|
|
|
|
|
One way to do this (and the only way you can associate a config file with a DLL) is to load it into a separate App Domain. I explain how to do it here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
First of all - Thanks for the answer.
I've read your blog post and your solution, however I prefer that my host (wpf exe) would not be responsible of delivering the config file to the dll.
Your solution works very good for the Plugin scenario, but in order to implement it I would have to copy the dll's config file to the exe's bin directory and use it's path in the exe's code.
I don't see much difference between this and manually adding the relevant setting to the exe config file.
Isn't there a better way to do this?
|
|
|
|
|
shaul-y wrote: Isn't there a better way to do this?
No. That's the whole point of the post. DLLs can only use config files with trickery (as described in the blog). You've effectively got two choices - add the references to your exe's config file, or use the technique I described and deploy the DLL and DLL config file. That's it. How else do you think you could do this?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|