|
gghhmmll wrote: سلام
من مي خوام يه كدي بنويسم كه مشخصات سخت افزاري سيستم رو با اگوريتم
aes
رمز كنه و به وب سايت كه طراحي كردم بفرستم
ميشه راهنمايي كنيد
مرسي
lf8898@yahoo.com
If it's a question, please ask it in English !
|
|
|
|
|
Questions in the forum should be asked in English.
|
|
|
|
|
hi
i want to learn XML,Xhtml. please provide me the help.
why we use XML,Xhtml?
|
|
|
|
|
|
|
|
XML: It provides a common medium through which people/organizations can exchange data regardless of their own data format. The data format can vary from one to another and XML resolves this problem.
I have no idea about Xhtml. You can learn more if you visit the links given above.
|
|
|
|
|
HI, I write the following code to connect to my database
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Data.ProviderBase;
using System.Configuration;
namespace Hostel.Models.DataAccessLayer
{
public class PersonDataSet
{
DataSet DS = new DataSet();
SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["HostelConnectionString"].ToString());
SqlDataAdapter PersonDataAdapter = new
SqlDataAdapter(new SqlCommand("SELECT * FROM Person_prs", Conn));
}
}
but after running get this error:
<br />
Error 1 A field initializer cannot reference the non-static field, method, or property 'Hostel.Models.DataAccessLayer.PersonDataSet.Conn'<br />
does any one has any idea?
|
|
|
|
|
Initialize the constructor. Also didn't contain any methods. Try like this
public class PersonDataSet
{
SqlConnection Conn = new SqlConnection();
public PersonDataSet
{
Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["HostelConnectionString"].ToString());
}
public MethodPersonDataSet
{
DataSet DS = new DataSet();
SqlDataAdapter PersonDataAdapter = new
SqlDataAdapter(new SqlCommand("SELECT * FROM Person_prs", Conn));
}
}
|
|
|
|
|
Hi every one,
I am new programmer and need a good example of MVC. in MVC I Model part I wanna use Dataset. Could you please give me an example or link regarding how to use Dataset in MVC model. I just need to insert data.
to be honest, I went trough internet by couldn't get good example.
I would please if some one help me.
|
|
|
|
|
|
I'm looking for a template for a webpage that customers would use to check their account transaction history and summary.
Have an Idea of how to do it, but don't want to reinvent the wheel.
Thanks
- Life is a fountain
|
|
|
|
|
using (apReportDataContext context = new apReportDataContext())
{
var appointments = (
from app in context.t_msts
join li in context.Lead_In
on app.apm_LeadID equals li.iLeadID into app_li
from li in app_li.DefaultIfEmpty()
join cs in context.custContactInfos on li.iLeadID equals cs.id into li_cs
from cs in li_cs.DefaultIfEmpty()
join apm in context.atm_appointment_type_masts on app.apm_type_id equals apm.atm_id into cs_apm
from apm in cs_apm.DefaultIfEmpty()
select new
{
app.apm_id,
app.apm_name,
app.apm_desc,
app.apm_start_time,
cs.CustomerName,
apm.atm_type_name,
});
grv.DataSource = appointments.Distinct();
grv.DataBind();
}
this is generating me result as expected now i need to pass paameters to this when generate report button is clicked, i have a drop down and if drop down value !=0 then i have to pass the value of it and if another text box field is filled then i have to pass that also as a parameter
how can i do this?
|
|
|
|
|
You need to use where keyword here. It behaves same as the where clause in the SQL statements. Something like this:
from element in someIEnumerable
where element.property == someValue
select element
|
|
|
|
|
thanks for your reply
yes what you said is working but if suppose user not entering value of text box then the value will be empty, this will give error, i need to check as this for 5 input controls, and if a control value is not empty then i have to pass that one as a parameter. how to do this.
|
|
|
|
|
If those values are mandatory, use RequiredFieldValidator. If not, then you will have to check for the null values.
Since I do not know the exact scenario in your application, cannot provide any better solution.
|
|
|
|
|
Thanks again for your reply ..
finally i got a solution and i have done it as below.
using (apReportDataContext context = new apReportDataContext())
{
var appointments = (
from app in context.t_msts
join li in context.Lead_In on app.apm_LeadID equals li.iLeadID into app_li
from li in app_li.DefaultIfEmpty()
join cs in context.custContactInfos on li.iLeadID equals cs.id into li_cs
from cs in li_cs.DefaultIfEmpty()
join apm in context.atm_appointment_type_masts on app.apm_type_id equals apm.atm_id into cs_apm
from apm in cs_apm.DefaultIfEmpty()
select new
{
app.apm_id,
app.apm_name,
app.apm_desc,
app.apm_start_time,
cs.CustomerName,
apm.atm_type_name
}
);
if (dropdown.SelectedIndex != 0) appointments=
apps.Where(ap => ap.apm_ID.Equals(dropdown.SelectedValue));
grv.DataSource = appointments.Distinct();
grv.DataBind();
|
|
|
|
|
hello everybody,
in my web site i have two databases, ASPNETDB.MDF and a self created one (database.mdf). (The don't contain a lot of data yet) But i need a relationship (foreign key) between a table in ASPNETDB.MDF and a table in database.mdf.
So i guess i need to merge both databases first, would you just extend the "ASPNETDB.MDF" with the tables from "database.mdf" ? or better configure "database.mdf" for the asp.net Applicatoin Services and then delete "ASPNETDB.MDF" ? Is "ASPNETDB.MDF" even meant to be used in a production online web application?
(Right now i'm using sql server express but i will probably use sql server when deploying Site to a shared host)
thanks a lot for answers
|
|
|
|
|
Merge the two databases on One! and then make your relationship with tables.
|
|
|
|
|
Hi,
I am trying to bind a XML file to a grdiview and get an error:
The data source for GridView with id 'gvPhotos' did not have any properties or attributes from which to generate columns. Ensure that your data source has content.
I found out that I have to make and xsl format to solve this issue. Here is the original XML file.
What's the correct XSL format for it ? Thanks for the time and effort.
<gallery>
<settings>
<imagesFolder>friedmans-admin/Photos/</imagesFolder>
<bgImage alpha="100" source="images/bg.jpg"/>
<image align="center" cornerRadius="0" scaleMode="fill" transitionEffect="fade" useShadow="true"/>
<thumbnail width="60" height="40" cornerRadius="0" alpha="70" outlineColor="0xFFFFFF" outlineColorOnRollOver="0xFFFFFF" outlineColorOnClick="0x8B0000" useShadow="true" usePreview="true"/>
<thumbBar scrollSpeed="10" position="bottom"/>
<preview alpha="100" width="200" height="100" outlineColor="0xFFFFFF" useShadow="true" cornerRadius="0"/>
<caption position="bottom" visibleMode="onRollOver" bgAlpha="30" color="0xFFFFFF" bgColor="0x000000" fontName="Verdana" fontSize="12"/>
<slideshow start="false" delay="3" loop="true" stopAutoOnClick="true"/>
<preloader alpha="100" usePreloader="true" />
<buttons fullScreenButton="true" navigationButtons="true" slideshowButton="true" />
<sounds onRollOver="sounds/over.mp3" onClick="" />
<picasa user="" albumID="" />
</settings>
<items>
<item source="1.jpg" thumb="" description="Image 1" link="http://flash-gallery.com" target="_blank"/>
</items>
</gallery>
|
|
|
|
|
Hi,
I've written a stream to minify HTML code and I want to make it run every time a response is completed.
To do this, I've created a module that registers this stream using the Response.Filter property.
The problem is that on some pages of my website, I get an ObjectDisposedException while writing in the base stream (the original value of Response.Filter).
Any solutions?
PS: the only difference between the "working" pages and the "not working" pages, is that the not working page contains a TabControl.
I hope the TabControl isn't the cause of this exception!
|
|
|
|
|
Hi,
I have this class:
[Serializable]
public class Item
{
public string ProdName { get; set; }
public string Qty { get; set; }
}
[Serializable]
public class Order
{
public DateTime Dt;
public int CustomerId;
public List<Item> Items;
}
It's implemented in a separated assembly and is used in a lot of projects (the class is bigger than it appears here)
When I made a webService to return a List<item>, I have two problems.
1) The WebReference I add in the client has a definition of Order that the compiler thinks it's not from the assembly they are defined into. I can't cast. I have to create a List<item> and populate with the data returned from the WebMethod. Worst, It doesn't return a List<>, it returns an [].
2) The Item.Items is not a member of this new (mirror) type the webservice declares?
Is there a way to fix it? At least the #2?
Thanks,
Dirso
|
|
|
|
|
|
Hi!
1) I see, i think it would work, but the other problems keep comming
2) Didn't work for me. The Items are a IList<item> I tried to XmlInclude Item, but it still doesn't seem to be exported
Thanks,
Dirso
|
|
|
|
|
Dirso wrote: 1) The WebReference I add in the client has a definition of Order that the compiler thinks it's not from the assembly they are defined into. I can't cast. I have to create a List and populate with the data returned from the WebMethod. Worst, It doesn't return a List<>, it returns an [].
This is correct (and good!) behaviour. The web service is supposed to be agnostic of the client (for example a Java client can consume a .Net web service and vice versa). This is the reason the list is returned as an array, as all languages have the concept of an array, but not a list. The same goes for the Order type not casting, the message passed between the client and server is just a "value bag" that looks like an object, you are supposed to populate proper objects from them when then response is recieved. When you generate the client, a new class type is created. The generated class will have a different namespace but normally the same name as the originating server type. This won't cast as it is a completely different type as far as the runtime is concerned, you have to write a convertor if you wish to include the original class. Web Services != Object Orientation.
|
|
|
|