Thursday, March 29, 2012
Pass information from XML file to ASPX page
I have an XML file, which contains let's say a <A> tag with a "AProp"
property. I want to manipulate this XML file so that the value of the
AProp property can be passed to the code-behind class (let's say
code.aspx.cs) of another ASPX page. How can I accomplish that?
Thanks in advance for help,
uservoidHi evangelous,
Maybe this can help you:
http://www.planet-source-code.com/v...gWId=10
Guillermo G.
----
--
Guillermo Gonzlez Arroyave :: MCP ASP.Net C# :: DCE4
<evangelous@.gmail.com> wrote in message news:1122017876.519551.161420@.g49g20
00cwa.googlegroups.com...
Hello,
I have an XML file, which contains let's say a <A> tag with a "AProp"
property. I want to manipulate this XML file so that the value of the
AProp property can be passed to the code-behind class (let's say
code.aspx.cs) of another ASPX page. How can I accomplish that?
Thanks in advance for help,
uservoid
Pass information from XML file to ASPX page
I have an XML file, which contains let's say a <A> tag with a "AProp"
property. I want to manipulate this XML file so that the value of the
AProp property can be passed to the code-behind class (let's say
code.aspx.cs) of another ASPX page. How can I accomplish that?
Thanks in advance for help,
uservoidHi evangelous,
Maybe this can help you:
http://www.planet-source-code.com/v...=3753&lngWId=10
Guillermo G.
------------------------
Guillermo Gonzlez Arroyave :: MCP ASP.Net C# :: DCE4
<evangelous@.gmail.com> wrote in message news:1122017876.519551.161420@.g49g2000cwa.googlegr oups.com...
Hello,
I have an XML file, which contains let's say a <A> tag with a "AProp"
property. I want to manipulate this XML file so that the value of the
AProp property can be passed to the code-behind class (let's say
code.aspx.cs) of another ASPX page. How can I accomplish that?
Thanks in advance for help,
uservoid
Pass recordset from code-behind to aspx file
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.
Any ideas?
ThanksIt doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.
Has anyone done this? I can't seem to figure it out.
slowmotiongenius@.gmail.com wrote:
> All-
> I have established an adodb recordset in my code-behind, and I need to
> pass it to the aspx file. I can't seem to figure out if there is a way
> to do this. I see you can pass a string over using the
> GetCallbackResult, but a recordset won't pass this way.
> Any ideas?
>
> Thanks
Huh'
First, if you're using ADODB recordsets, you're probably doing something
wrong.
DataSets, IDataReaders are the "new" data model. If you used the upgrade
wizard, then I'd suggest refactoring that code.
..
You don't "pass" a datastore to the aspx file.
You usually put a control on the aspx page, and then bind it to a datasource
on the code behind page.
..
in 1.1, you'll do this
draw a datagrid on the aspx page.
on the page load
if (!Page.IsPostBack)
{
this.DataGrid1.DataSource = something;// where something is usually
a DataSet, IDataReader or an Array, or a CollectionBase
this.DataGrid1.DataBind();
}
asp.net is not an upgrade from asp. its a completely different animal
<slowmotiongenius@.gmail.com> wrote in message
news:1149866390.158704.78010@.g10g2000cwb.googlegroups.com...
> It doesn't even have to be a recordset. It could be an array, etc. I
> need a way to pass variables, beyond strings, from the aspx.vb file to
> the aspx file.
> Has anyone done this? I can't seem to figure it out.
>
> slowmotiongenius@.gmail.com wrote:
>
slowmotiongenius@.gmail.com wrote:
> All-
> I have established an adodb recordset in my code-behind, and I need to
> pass it to the aspx file. I can't seem to figure out if there is a way
> to do this. I see you can pass a string over using the
> GetCallbackResult, but a recordset won't pass this way.
>
If you really have an adodb.recordset, then you must be using interop,
right?
Anyways, you can do something like this:
http://www.davidpenton.com/testsite...rver2client.asp
or this, if you don't really need the recordset functionality:
http://www.davidpenton.com/testsite...ata.islands.asp
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Sorry, I'm using an adodb recordset because I wanted to set the
datasource of an office web component Pivottable equal to one. I read
that you could only use an xml file, a office web component data source
control, or a recordset. There was no mention of being able to use a
DataSet.
Now I can't draw the control for the Pivottable on the aspx page. I
have to place this in the aspx file
<-object classid="clsid:0002E552-0000-0000-C000-000000000046"
id="Pivot1" height="300" width="600"></object>
or do a response.write("<object
classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
height="300" width="600"></object>") in the aspx.vb pivottable.
Either way, the control isn't something that I can reference in the
aspx.vb by saying
Pivot1.DataSource = XXXXXXX
So I need to response.write("Pivot1.Datasource = " + adodbRS)
or some way to pass the record set over to the aspx file so I can
assign the datasource of the pivot table to it.
Does this make sense? Any way to accomplish something like this?
Thanks for the response!
sloan wrote:
> Huh'
> First, if you're using ADODB recordsets, you're probably doing something
> wrong.
> DataSets, IDataReaders are the "new" data model. If you used the upgrade
> wizard, then I'd suggest refactoring that code.
> ..
> You don't "pass" a datastore to the aspx file.
> You usually put a control on the aspx page, and then bind it to a datasour
ce
> on the code behind page.
> ..
> in 1.1, you'll do this
> draw a datagrid on the aspx page.
> on the page load
> if (!Page.IsPostBack)
> {
> this.DataGrid1.DataSource = something;// where something is usuall
y
> a DataSet, IDataReader or an Array, or a CollectionBase
> this.DataGrid1.DataBind();
> }
>
> asp.net is not an upgrade from asp. its a completely different animal
>
> <slowmotiongenius@.gmail.com> wrote in message
> news:1149866390.158704.78010@.g10g2000cwb.googlegroups.com...
Someone has to have needed to do something like this in the past...any
tips on passing a recordset/dataset from the code-behind to the aspx
page?
slowmotiongenius@.gmail.com wrote:
> Sorry, I'm using an adodb recordset because I wanted to set the
> datasource of an office web component Pivottable equal to one. I read
> that you could only use an xml file, a office web component data source
> control, or a recordset. There was no mention of being able to use a
> DataSet.
> Now I can't draw the control for the Pivottable on the aspx page. I
> have to place this in the aspx file
> <-object classid="clsid:0002E552-0000-0000-C000-000000000046"
> id="Pivot1" height="300" width="600"></object>
> or do a response.write("<object
> classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
> height="300" width="600"></object>") in the aspx.vb pivottable.
> Either way, the control isn't something that I can reference in the
> aspx.vb by saying
> Pivot1.DataSource = XXXXXXX
> So I need to response.write("Pivot1.Datasource = " + adodbRS)
> or some way to pass the record set over to the aspx file so I can
> assign the datasource of the pivot table to it.
> Does this make sense? Any way to accomplish something like this?
> Thanks for the response!
>
> sloan wrote:
Pass recordset from code-behind to aspx file
I have established an adodb recordset in my code-behind, and I need to
pass it to the aspx file. I can't seem to figure out if there is a way
to do this. I see you can pass a string over using the
GetCallbackResult, but a recordset won't pass this way.
Any ideas?
ThanksIt doesn't even have to be a recordset. It could be an array, etc. I
need a way to pass variables, beyond strings, from the aspx.vb file to
the aspx file.
Has anyone done this? I can't seem to figure it out.
slowmotiongenius@.gmail.com wrote:
> All-
> I have established an adodb recordset in my code-behind, and I need to
> pass it to the aspx file. I can't seem to figure out if there is a way
> to do this. I see you can pass a string over using the
> GetCallbackResult, but a recordset won't pass this way.
> Any ideas?
>
> Thanks
Huh??
First, if you're using ADODB recordsets, you're probably doing something
wrong.
DataSets, IDataReaders are the "new" data model. If you used the upgrade
wizard, then I'd suggest refactoring that code.
...
You don't "pass" a datastore to the aspx file.
You usually put a control on the aspx page, and then bind it to a datasource
on the code behind page.
...
in 1.1, you'll do this
draw a datagrid on the aspx page.
on the page load
if (!Page.IsPostBack)
{
this.DataGrid1.DataSource = something;// where something is usually
a DataSet, IDataReader or an Array, or a CollectionBase
this.DataGrid1.DataBind();
}
asp.net is not an upgrade from asp. its a completely different animal
<slowmotiongenius@.gmail.com> wrote in message
news:1149866390.158704.78010@.g10g2000cwb.googlegro ups.com...
> It doesn't even have to be a recordset. It could be an array, etc. I
> need a way to pass variables, beyond strings, from the aspx.vb file to
> the aspx file.
> Has anyone done this? I can't seem to figure it out.
>
> slowmotiongenius@.gmail.com wrote:
> > All-
> > I have established an adodb recordset in my code-behind, and I need to
> > pass it to the aspx file. I can't seem to figure out if there is a way
> > to do this. I see you can pass a string over using the
> > GetCallbackResult, but a recordset won't pass this way.
> > Any ideas?
> > Thanks
slowmotiongenius@.gmail.com wrote:
> All-
> I have established an adodb recordset in my code-behind, and I need to
> pass it to the aspx file. I can't seem to figure out if there is a way
> to do this. I see you can pass a string over using the
> GetCallbackResult, but a recordset won't pass this way.
If you really have an adodb.recordset, then you must be using interop,
right?
Anyways, you can do something like this:
http://www.davidpenton.com/testsite...rver2client.asp
or this, if you don't really need the recordset functionality:
http://www.davidpenton.com/testsite...ata.islands.asp
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Sorry, I'm using an adodb recordset because I wanted to set the
datasource of an office web component Pivottable equal to one. I read
that you could only use an xml file, a office web component data source
control, or a recordset. There was no mention of being able to use a
DataSet.
Now I can't draw the control for the Pivottable on the aspx page. I
have to place this in the aspx file
<-object classid="clsid:0002E552-0000-0000-C000-000000000046"
id="Pivot1" height="300" width="600"></object
or do a response.write("<object
classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
height="300" width="600"></object>") in the aspx.vb pivottable.
Either way, the control isn't something that I can reference in the
aspx.vb by saying
Pivot1.DataSource = XXXXXXX
So I need to response.write("Pivot1.Datasource = " + adodbRS)
or some way to pass the record set over to the aspx file so I can
assign the datasource of the pivot table to it.
Does this make sense? Any way to accomplish something like this?
Thanks for the response!
sloan wrote:
> Huh??
> First, if you're using ADODB recordsets, you're probably doing something
> wrong.
> DataSets, IDataReaders are the "new" data model. If you used the upgrade
> wizard, then I'd suggest refactoring that code.
> ..
> You don't "pass" a datastore to the aspx file.
> You usually put a control on the aspx page, and then bind it to a datasource
> on the code behind page.
> ..
> in 1.1, you'll do this
> draw a datagrid on the aspx page.
> on the page load
> if (!Page.IsPostBack)
> {
> this.DataGrid1.DataSource = something;// where something is usually
> a DataSet, IDataReader or an Array, or a CollectionBase
> this.DataGrid1.DataBind();
> }
>
> asp.net is not an upgrade from asp. its a completely different animal
>
> <slowmotiongenius@.gmail.com> wrote in message
> news:1149866390.158704.78010@.g10g2000cwb.googlegro ups.com...
> > It doesn't even have to be a recordset. It could be an array, etc. I
> > need a way to pass variables, beyond strings, from the aspx.vb file to
> > the aspx file.
> > Has anyone done this? I can't seem to figure it out.
> > slowmotiongenius@.gmail.com wrote:
> > > All-
> > > I have established an adodb recordset in my code-behind, and I need to
> > > pass it to the aspx file. I can't seem to figure out if there is a way
> > > to do this. I see you can pass a string over using the
> > > GetCallbackResult, but a recordset won't pass this way.
> > > > Any ideas?
> > > > > Thanks
Someone has to have needed to do something like this in the past...any
tips on passing a recordset/dataset from the code-behind to the aspx
page?
slowmotiongenius@.gmail.com wrote:
> Sorry, I'm using an adodb recordset because I wanted to set the
> datasource of an office web component Pivottable equal to one. I read
> that you could only use an xml file, a office web component data source
> control, or a recordset. There was no mention of being able to use a
> DataSet.
> Now I can't draw the control for the Pivottable on the aspx page. I
> have to place this in the aspx file
> <-object classid="clsid:0002E552-0000-0000-C000-000000000046"
> id="Pivot1" height="300" width="600"></object>
> or do a response.write("<object
> classid="clsid:0002E552-0000-0000-C000-000000000046" id="Pivot1"
> height="300" width="600"></object>") in the aspx.vb pivottable.
> Either way, the control isn't something that I can reference in the
> aspx.vb by saying
> Pivot1.DataSource = XXXXXXX
> So I need to response.write("Pivot1.Datasource = " + adodbRS)
> or some way to pass the record set over to the aspx file so I can
> assign the datasource of the pivot table to it.
> Does this make sense? Any way to accomplish something like this?
> Thanks for the response!
>
> sloan wrote:
> > Huh??
> > First, if you're using ADODB recordsets, you're probably doing something
> > wrong.
> > DataSets, IDataReaders are the "new" data model. If you used the upgrade
> > wizard, then I'd suggest refactoring that code.
> > ..
> > You don't "pass" a datastore to the aspx file.
> > You usually put a control on the aspx page, and then bind it to a datasource
> > on the code behind page.
> > ..
> > in 1.1, you'll do this
> > draw a datagrid on the aspx page.
> > on the page load
> > if (!Page.IsPostBack)
> > {
> > this.DataGrid1.DataSource = something;// where something is usually
> > a DataSet, IDataReader or an Array, or a CollectionBase
> > this.DataGrid1.DataBind();
> > }
> > asp.net is not an upgrade from asp. its a completely different animal
> > <slowmotiongenius@.gmail.com> wrote in message
> > news:1149866390.158704.78010@.g10g2000cwb.googlegro ups.com...
> > > It doesn't even have to be a recordset. It could be an array, etc. I
> > > need a way to pass variables, beyond strings, from the aspx.vb file to
> > > the aspx file.
> > > > Has anyone done this? I can't seem to figure it out.
> > > > > slowmotiongenius@.gmail.com wrote:
> > > > All-
> > > > I have established an adodb recordset in my code-behind, and I need to
> > > > pass it to the aspx file. I can't seem to figure out if there is a way
> > > > to do this. I see you can pass a string over using the
> > > > GetCallbackResult, but a recordset won't pass this way.
> > > > > > Any ideas?
> > > > > > > > Thanks
>
Monday, March 26, 2012
Pass the name into HTM file
I have an HTML which I load as string and send it via MailMessage class.
oMailMessage.Body = cHTMLString
Before it is sent as e-mail I need to pass the HTM file the user
First and Last in the first line.
It is a form where the user enters his/her details and then it is
e-mailed the user with the HTM file within the e-mail's body.
It would start like:
Hi Steve Smith,
How can I embed the First and Last name of the user into the htm file?
Thanks,
Joe"JoeP" <DF_XYZ@.hotmail.com> wrote in message
news:ug8bTf5XHHA.4220@.TK2MSFTNGP03.phx.gbl...
> I have an HTML which I load as string and send it via MailMessage class.
> oMailMessage.Body = cHTMLString
> Before it is sent as e-mail I need to pass the HTM file the user
> First and Last in the first line.
> It is a form where the user enters his/her details and then it is
> e-mailed the user with the HTM file within the e-mail's body.
> It would start like:
> Hi Steve Smith,
> How can I embed the First and Last name of the user into the htm file?
oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;
Hi Mark,
Thanks for your reply. But how do I keep the Verdana font of that embeded
string?
Also the semi column was a problem and got an err which is: Character is not
valid
oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;
Thanks,
Joe
"JoeP" <DF_XYZ@.hotmail.com> wrote in message
news:OjyJY8$XHHA.992@.TK2MSFTNGP04.phx.gbl...
> Thanks for your reply. But how do I keep the Verdana font of that embeded
> string?
oMailMessage.IsBodyHtml = true;
> Also the semi column was a problem and got an err which is: Character is
> not valid
Ah - I assumed you were using C#...
If you're using VB.NET, you'll (probably) need to do something like:
oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
oMailMessage.Body = oMailMessage.Body & cHTMLString
oMailMessage.IsBodyHtml = True
Hi Mark,
Your idea works as well, but even though: oMailMessage.IsBodyHtml = True
The fornt of the below is not the same any more:
oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
What I did is: In the first line of the HTM file I did as follows:
Hi {First Name} {Last Name},
Then:
cHTMLString = cHTMLString.Replace("{First Name}", txtFName.Text)
cHTMLString = cHTMLString.Replace("{Last Name}", txtLName.Text)
Thanks,
Joe
Hi,
Actually solution was simple just add font tag in html
like
oMailMessage.Body = "Hi <font face=verdana size=10>" & txtFirstName.Text & "
" & txtLastName.Text & ""
vbCrLf & vbCrLf
oMailMessage.Body = oMailMessage.Body & cHTMLString
oMailMessage.IsBodyHtml = True
it will definately work
cheers
Chetan Chaphekar
"JoeP" wrote:
> Hi Mark,
> Your idea works as well, but even though: oMailMessage.IsBodyHtml = True
> The fornt of the below is not the same any more:
> oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
> vbCrLf & vbCrLf
> What I did is: In the first line of the HTM file I did as follows:
> Hi {First Name} {Last Name},
> Then:
> cHTMLString = cHTMLString.Replace("{First Name}", txtFName.Text)
> cHTMLString = cHTMLString.Replace("{Last Name}", txtLName.Text)
> Thanks,
> Joe
"Chetan Chaphekar" <ChetanChaphekar@.discussions.microsoft.com> wrote in
message news:F8362751-1E99-4F82-B043-D3D44F0A120F@.microsoft.com...
> it will definately work
As far as you are concerned, it will definitely work...
However, you need to think quite carefully about sending HTML emails...
Most modern mail software can be configured not only to strip out all HTML
content, but also to reject emails with HTML content...
Depending on how paranoid / security-conscious your recipients are, they
might never even see your emails if you send them in HTML format...
Hi Mark,
The problem is that I have some links in that HTM file. So I how can I
provide those links without any HTM code. Otherwise the user will need to
copy the URL into the Browser. Not that productive.
Regards,
Joe
"JoeP" <DF_XYZ@.hotmail.com> wrote in message
news:OCnYUOPYHHA.3268@.TK2MSFTNGP04.phx.gbl...
> The problem is that I have some links in that HTM file. So I how can I
> provide those links without any HTM code.
You can't...
> Otherwise the user will need to copy the URL into the Browser.
That's true.
> Not that productive.
Even less productive if the email gets rejected by the user's mail client
before the user even has a chance to see it...
Your call...
Hi Joep,
What mark has said is right but also consider the percentage of receipient
who has this kind of settings. almost all sites who send newsletter to the
subscriber use HTML code in their email.
cheers
chetan chaphekar
"JoeP" wrote:
> Hi Mark,
> The problem is that I have some links in that HTM file. So I how can I
> provide those links without any HTM code. Otherwise the user will need to
> copy the URL into the Browser. Not that productive.
> Regards,
> Joe
>
>
Pass the name into HTM file
I have an HTML which I load as string and send it via MailMessage class.
oMailMessage.Body = cHTMLString
Before it is sent as e-mail I need to pass the HTM file the user
First and Last in the first line.
It is a form where the user enters his/her details and then it is
e-mailed the user with the HTM file within the e-mail's body.
It would start like:
Hi Steve Smith,
How can I embed the First and Last name of the user into the htm file?
Thanks,
Joe
"JoeP" <DF_XYZ@.hotmail.comwrote in message
news:ug8bTf5XHHA.4220@.TK2MSFTNGP03.phx.gbl...
Quote:
Originally Posted by
I have an HTML which I load as string and send it via MailMessage class.
oMailMessage.Body = cHTMLString
>
Before it is sent as e-mail I need to pass the HTM file the user
First and Last in the first line.
>
It is a form where the user enters his/her details and then it is
e-mailed the user with the HTM file within the e-mail's body.
>
It would start like:
>
Hi Steve Smith,
>
How can I embed the First and Last name of the user into the htm file?
oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;
Hi Mark,
Thanks for your reply. But how do I keep the Verdana font of that embeded
string?
Also the semi column was a problem and got an err which is: Character is not
valid
oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;
Thanks,
Joe
"JoeP" <DF_XYZ@.hotmail.comwrote in message
news:OjyJY8$XHHA.992@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
Thanks for your reply. But how do I keep the Verdana font of that embeded
string?
oMailMessage.IsBodyHtml = true;
Quote:
Originally Posted by
Also the semi column was a problem and got an err which is: Character is
not valid
Ah - I assumed you were using C#...
If you're using VB.NET, you'll (probably) need to do something like:
oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
oMailMessage.Body = oMailMessage.Body & cHTMLString
oMailMessage.IsBodyHtml = True
Hi Mark,
Your idea works as well, but even though: oMailMessage.IsBodyHtml = True
The fornt of the below is not the same any more:
oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
What I did is: In the first line of the HTM file I did as follows:
Hi {First Name} {Last Name},
Then:
cHTMLString = cHTMLString.Replace("{First Name}", txtFName.Text)
cHTMLString = cHTMLString.Replace("{Last Name}", txtLName.Text)
Thanks,
Joe
Hi,
Actually solution was simple just add font tag in html
like
oMailMessage.Body = "Hi <font face=verdana size=10>" & txtFirstName.Text & "
" & txtLastName.Text & "</font>"
vbCrLf & vbCrLf
oMailMessage.Body = oMailMessage.Body & cHTMLString
oMailMessage.IsBodyHtml = True
it will definately work
cheers
Chetan Chaphekar
"JoeP" wrote:
Quote:
Originally Posted by
Hi Mark,
>
Your idea works as well, but even though: oMailMessage.IsBodyHtml = True
The fornt of the below is not the same any more:
>
oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
>
What I did is: In the first line of the HTM file I did as follows:
Hi {First Name} {Last Name},
>
Then:
cHTMLString = cHTMLString.Replace("{First Name}", txtFName.Text)
>
cHTMLString = cHTMLString.Replace("{Last Name}", txtLName.Text)
>
Thanks,
>
Joe
"Chetan Chaphekar" <ChetanChaphekar@.discussions.microsoft.comwrote in
message news:F8362751-1E99-4F82-B043-D3D44F0A120F@.microsoft.com...
Quote:
Originally Posted by
it will definately work
As far as you are concerned, it will definitely work...
However, you need to think quite carefully about sending HTML emails...
Most modern mail software can be configured not only to strip out all HTML
content, but also to reject emails with HTML content...
Depending on how paranoid / security-conscious your recipients are, they
might never even see your emails if you send them in HTML format...
Hi Mark,
The problem is that I have some links in that HTM file. So I how can I
provide those links without any HTM code. Otherwise the user will need to
copy the URL into the Browser. Not that productive.
Regards,
Joe
"JoeP" <DF_XYZ@.hotmail.comwrote in message
news:OCnYUOPYHHA.3268@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
The problem is that I have some links in that HTM file. So I how can I
provide those links without any HTM code.
You can't...
Quote:
Originally Posted by
Otherwise the user will need to copy the URL into the Browser.
That's true.
Quote:
Originally Posted by
Not that productive.
Even less productive if the email gets rejected by the user's mail client
before the user even has a chance to see it...
Your call...
Hi Joep,
What mark has said is right but also consider the percentage of receipient
who has this kind of settings. almost all sites who send newsletter to the
subscriber use HTML code in their email.
cheers
chetan chaphekar
"JoeP" wrote:
Quote:
Originally Posted by
Hi Mark,
>
The problem is that I have some links in that HTM file. So I how can I
provide those links without any HTM code. Otherwise the user will need to
copy the URL into the Browser. Not that productive.
>
Regards,
>
Joe
>
>
>
"Chetan Chaphekar" <ChetanChaphekar@.discussions.microsoft.comwrote in
message news:85AB981F-934B-453F-A698-D79B7C5CF3B9@.microsoft.com...
Quote:
Originally Posted by
but also consider the percentage of receipient who has this kind of
settings.
Increasing all the time...
Quote:
Originally Posted by
almost all sites who send newsletter to the subscriber use HTML code in
their email.
More and more now give their recipients the option of receiving such
correspondence either in plain text or HTML...
pass value of a variable to user control
Trying to pass a value to user control within a page.
1. Couldnt find a way to pass it from code behind file.
2. Trying to pass it from aspx page... using EditURL='<%
"mypage.aspx?myvar=" + myvalue %>' assigns value of EditURL=''
I have tried using a local variable... directly trying to read it off
Request object and even tried using session variable...
could be glad if someone could tell me how to get it right... thanks,
regards,
Hermit DaveYou need to use properties and pass them in the page load events for
example....
Doug Stevens, another MVP has this very useful example whih explains the
approach
http://www.dotnetjunkies.com/Articl...866F720AB013.dc
ik
--
Regards
John Timney (Microsoft ASP.NET MVP)
--------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
--------------
"Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in message
news:uV5MEnQwDHA.556@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Trying to pass a value to user control within a page.
> 1. Couldnt find a way to pass it from code behind file.
> 2. Trying to pass it from aspx page... using EditURL='<%
> "mypage.aspx?myvar=" + myvalue %>' assigns value of EditURL=''
> I have tried using a local variable... directly trying to read it off
> Request object and even tried using session variable...
> could be glad if someone could tell me how to get it right... thanks,
> regards,
> Hermit Dave
Hello John,
Thanks for the pointer. That article hopefully did show me what i wasnt
doing...
For same reason i did look around for the instance of user control in the
data member declaration earlier and couldnt find it...
Anyho... have to map the instance on aspx page to the code behind.. then i
should be able to populate the properties.. (ealier was passing hard coded
values from within aspx and that worked)
Thanks mate,
Regards,
Hermit Dave
"John Timney (Microsoft MVP)" <timneyj@.despammed.com> wrote in message
news:Od4uotQwDHA.3496@.TK2MSFTNGP11.phx.gbl...
> You need to use properties and pass them in the page load events for
> example....
> Doug Stevens, another MVP has this very useful example whih explains the
> approach
>
http://www.dotnetjunkies.com/Articl...866F720AB013.dc
> ik
>
> --
> Regards
> John Timney (Microsoft ASP.NET MVP)
> --------------
> <shameless_author_plug>
> Professional .NET for Java Developers with C#
> ISBN:1-861007-91-4
> Professional Windows Forms
> ISBN: 1861005547
> Professional JSP 2nd Edition
> ISBN: 1861004958
> Professional JSP
> ISBN: 1861003625
> Beginning JSP Web Development
> ISBN: 1861002092
> </shameless_author_plug>
> --------------
> "Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in message
> news:uV5MEnQwDHA.556@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > Trying to pass a value to user control within a page.
> > 1. Couldnt find a way to pass it from code behind file.
> > 2. Trying to pass it from aspx page... using EditURL='<%
> > "mypage.aspx?myvar=" + myvalue %>' assigns value of EditURL=''
> > I have tried using a local variable... directly trying to read it off
> > Request object and even tried using session variable...
> > could be glad if someone could tell me how to get it right... thanks,
> > regards,
> > Hermit Dave
"Hermit Dave" <hermitd.REMOVE@.CAPS.AND.DOTS.hotmail.com> wrote in message
news:uV5MEnQwDHA.556@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Trying to pass a value to user control within a page.
> 1. Couldnt find a way to pass it from code behind file.
> 2. Trying to pass it from aspx page... using EditURL='<%
> "mypage.aspx?myvar=" + myvalue %>' assigns value of EditURL=''
> I have tried using a local variable... directly trying to read it off
> Request object and even tried using session variable...
> could be glad if someone could tell me how to get it right... thanks,
> regards,
> Hermit Dave
I know you have already been pointed to the Properites as fits your
question.
Just as a side note though, you can also use a Cache object for passing
information to an from controls and web user controls. They are very handy.
--
Rocky Moore
www.HintsAndTips.com
Saturday, March 24, 2012
Pass values to .ascx
Simple question really, how do i pass values to a .ascx file from .aspx file in c#?
ThanksYou can set property values from your ASPX code.
This site has ALL in the info you'll need, I just found it myself the other day.
Mastering Page-UserControl Communication
I tried this once with a page with a tabstrip + multipage setup. Each tab contained it's own ascx file.
I never got it to work the way I thought that it should. Check this newsgroup thread of mine to see if it applies to you:
http://msdn.microsoft.com/newsgroups/default.aspx?pg=35&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.dotnet.framework.aspnet.webcontrols&fltr=
I came accross the following code that solved my problem, might help others also.
in myuc.aspx
----------
<%-- declare any namespaces --%>
<%@. Register Tagprefix="Channel" Tagname="Title" src="http://pics.10026.com/?src=myuc.ascx"%>
<Channel:Title MyTitle="ABC" /
In myuc.ascx
----------
<script language="C#" runat="server">
public String MyTitle ="Not Set";
void Page_Load(Object Sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
DisplayTitle.Text = MyTitle.ToString();
}
}
</Script>
<asp:Label id="DisplayTitle" runat="server" />
Check out the MSDN article by Scott Mitchell: An extensive Examination of User Controls
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/usercontrols.asp
Hello, you might check :An Extensive Examination of UserControls
regards
Pass Variable To User Control
flash navigation. My asp.net app is written in vb.net. The swf file
takes a parameter which I would like to pass into my user control.
Ideally i'd like to do something like this:
<object type="application/x-shockwave-flash"
data="flash/navigation.swf?page=<%pageName%>" width="850" height="148">
<param name="movie" value="flash/navigation.swf?page=<%pageName%>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
</object>
So how, in all my other pages I'd like to call it like this:
<myControl:incNavigation runat="server" ID="theNavigation"
pageName="home" />if you make PageName a property of the user control, this is pretty easy.
private _pageName as string
public property PageName as String
get
return _pageName
end get
set (value as string)
_pageName = value
end set
end property
public sub void Page_Load(...)
..
end sub
you can then do, as you want
<myControl:incNavigation runat="server" ID="theNavigation" PageName="home"
/>
and use PageName in your object, but make sure to use <%= PageName %> (you
were missing the = in your example)
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
<rhungund@.gmail.com> wrote in message
news:1134604813.689597.220380@.g43g2000cwa.googlegroups.com...
> Hi all. I have a user control I'm using as my "include" file for my
> flash navigation. My asp.net app is written in vb.net. The swf file
> takes a parameter which I would like to pass into my user control.
> Ideally i'd like to do something like this:
> <object type="application/x-shockwave-flash"
> data="flash/navigation.swf?page=<%pageName%>" width="850" height="148">
> <param name="movie" value="flash/navigation.swf?page=<%pageName%>" />
> <param name="quality" value="high" />
> <param name="bgcolor" value="#000000" />
> </object>
> So how, in all my other pages I'd like to call it like this:
> <myControl:incNavigation runat="server" ID="theNavigation"
> pageName="home" />
>
great. that worked! thank you.
Pass Web FileObject to a class
I have a file HTML object, I want to pass this object to a class so I can wr
ite a common method for uploading files.
Idea is to avoid coding file saving in the forms submit button, but call a m
ethod that can process the file that just got submitted.
Is this possible at all? Any idea on how to handle this issue?
TIA"kaushas" <kaushas@.discussions.microsoft.com> wrote in message
news:95A6B7BA-F2D9-4B2B-B60F-4BAA7EF1A4ED@.microsoft.com...
> All
> I have a file HTML object, I want to pass this object to a class so I can
write a common method for uploading files.
> Idea is to avoid coding file saving in the forms submit button, but call a
method that can process the file that just got submitted.
> Is this possible at all? Any idea on how to handle this issue?
Do you mean that you want to pass the "file HTML object" to a method of a
class? Just pass it. What problem are you having when you try to do this?
Can you post some code that reproduces the problem?
--
John Saunders
johnwsaundersiii at hotmail
Sorry
I should have been more specific. I was looking for the object type that I n
eeded to define in the method signature... and then I answered my own quest
ion -> it has to be the HtmlInputFile type that needs to be passed to the me
thod... duh
thanks
"John Saunders" wrote:
> "kaushas" <kaushas@.discussions.microsoft.com> wrote in message
> news:95A6B7BA-F2D9-4B2B-B60F-4BAA7EF1A4ED@.microsoft.com...
> write a common method for uploading files.
> method that can process the file that just got submitted.
> Do you mean that you want to pass the "file HTML object" to a method of a
> class? Just pass it. What problem are you having when you try to do this?
> Can you post some code that reproduces the problem?
> --
> John Saunders
> johnwsaundersiii at hotmail
>
>
Pass Web FileObject to a class
I have a file HTML object, I want to pass this object to a class so I can write a common method for uploading files.
Idea is to avoid coding file saving in the forms submit button, but call a method that can process the file that just got submitted.
Is this possible at all? Any idea on how to handle this issue?
TIA"kaushas" <kaushas@.discussions.microsoft.com> wrote in message
news:95A6B7BA-F2D9-4B2B-B60F-4BAA7EF1A4ED@.microsoft.com...
> All
> I have a file HTML object, I want to pass this object to a class so I can
write a common method for uploading files.
> Idea is to avoid coding file saving in the forms submit button, but call a
method that can process the file that just got submitted.
> Is this possible at all? Any idea on how to handle this issue?
Do you mean that you want to pass the "file HTML object" to a method of a
class? Just pass it. What problem are you having when you try to do this?
Can you post some code that reproduces the problem?
--
John Saunders
johnwsaundersiii at hotmail
Sorry
I should have been more specific. I was looking for the object type that I needed to define in the method signature... and then I answered my own question -> it has to be the HtmlInputFile type that needs to be passed to the method... duh
thanks
"John Saunders" wrote:
> "kaushas" <kaushas@.discussions.microsoft.com> wrote in message
> news:95A6B7BA-F2D9-4B2B-B60F-4BAA7EF1A4ED@.microsoft.com...
> > All
> > I have a file HTML object, I want to pass this object to a class so I can
> write a common method for uploading files.
> > Idea is to avoid coding file saving in the forms submit button, but call a
> method that can process the file that just got submitted.
> > Is this possible at all? Any idea on how to handle this issue?
> Do you mean that you want to pass the "file HTML object" to a method of a
> class? Just pass it. What problem are you having when you try to do this?
> Can you post some code that reproduces the problem?
> --
> John Saunders
> johnwsaundersiii at hotmail
>
Pass XML File to web page
I need to pass an XML file to an ASP.Net web page on a remote server.
The .net page will read this XML file and act upon its contents. How
do I go about passing such a file?
thanks in advance...
-Mike"bdtmike" <mike.aes@.gmail.com> wrote in news:1139459368.262630.114360
@.g44g2000cwa.googlegroups.com:
> Ok, I'm a relative web newbie here so bear with me...
> I need to pass an XML file to an ASP.Net web page on a remote server.
> The .net page will read this XML file and act upon its contents. How
> do I go about passing such a file?
That sounds like a web service : )
Stan Kee (spamhoneypot@.rogers.com)
Boycott StarForce!
http://www.glop.org/starforce
You've not said what your client is, as you could just do a file upload if
its a asp.net page and open the file on the server using the xml classes.
If its a client app, theres a good example here:
http://www.codeproject.com/Purgatory/XmlPost.asp
Regards
John Timney
Microsoft MVP
"bdtmike" <mike.aes@.gmail.com> wrote in message
news:1139459368.262630.114360@.g44g2000cwa.googlegroups.com...
> Ok, I'm a relative web newbie here so bear with me...
> I need to pass an XML file to an ASP.Net web page on a remote server.
> The .net page will read this XML file and act upon its contents. How
> do I go about passing such a file?
> thanks in advance...
> -Mike
>
Well, here's what I want: I have an ASP.Net web page that will produce
a google map with points plotted on the map. Points and other
parameters are passed to this page via XML. The page should act on
this file and render the page accordingly. The client would be an IE
browser. The end result is a web page.
John,
how do you do a file upload to an ASP page?
lots of articles on this topic
http://www.codeproject.com/aspnet/fileupload.asp
Regards
John Timney
Microsoft MVP
"bdtmike" <mike.aes@.gmail.com> wrote in message
news:1141570184.957328.238320@.i40g2000cwc.googlegroups.com...
> John,
> how do you do a file upload to an ASP page?
>
You want something like this web page does?
http://www.reimers.dk/atlas/map.aspx
Pass XML File to web page
I need to pass an XML file to an ASP.Net web page on a remote server.
The .net page will read this XML file and act upon its contents. How
do I go about passing such a file?
thanks in advance...
-MikeYou've not said what your client is, as you could just do a file upload if
its a asp.net page and open the file on the server using the xml classes.
If its a client app, theres a good example here:
http://www.codeproject.com/Purgatory/XmlPost.asp
--
Regards
John Timney
Microsoft MVP
"bdtmike" <mike.aes@.gmail.com> wrote in message
news:1139459368.262630.114360@.g44g2000cwa.googlegr oups.com...
> Ok, I'm a relative web newbie here so bear with me...
> I need to pass an XML file to an ASP.Net web page on a remote server.
> The .net page will read this XML file and act upon its contents. How
> do I go about passing such a file?
> thanks in advance...
> -Mike
Well, here's what I want: I have an ASP.Net web page that will produce
a google map with points plotted on the map. Points and other
parameters are passed to this page via XML. The page should act on
this file and render the page accordingly. The client would be an IE
browser. The end result is a web page.
John,
how do you do a file upload to an ASP page?
lots of articles on this topic
http://www.codeproject.com/aspnet/fileupload.asp
--
Regards
John Timney
Microsoft MVP
"bdtmike" <mike.aes@.gmail.com> wrote in message
news:1141570184.957328.238320@.i40g2000cwc.googlegr oups.com...
> John,
> how do you do a file upload to an ASP page?
You want something like this web page does?
http://www.reimers.dk/atlas/map.aspx
Wednesday, March 21, 2012
Passing a CSV file into APSX page and returning query from SQL server using CSV data?
Is this possible basically?
I have a CSV file that contains a list of barcodes, I would like to create a page that will upload this into a temp table of some kind and query a SQL using the CSV file to join the data to the table.
This would then output the result to a list on the page.
Any ideas? As yet I haven't managed to start anything on ASP.net yet!
Of course it's possible. Almost anything is possible. When you get to your coding you should ask the specific questions that you need answered.
Here is one way on how to do this
1. Read your file using FileStream.
2. Create a datatable and its columns.
3. Loop through your file (using FileStream) and populate your datatable.
4. Create a dataview and set to the datatable.
5. Use rowfilter to filter out data you don't want to show.
6. Bind the data to your DataGrid or DataList to display the data onto the page.
Many thanks for your reply, more the kinda reply that I was hoping for.
The method that you have said, trying to understand this:
Does part 3 put the data into the database?
Where do I execute a query/sp to get the correct additional data back? (As more relevant data will be coming back based on a join to the new fields in the table)?
Thanks
passing a parameter?
Hi Guys,
I am just starting on ASP.net. I have created this file so far called database.aspx. The file contains this code:
<%@dotnet.itags.org. Page Language="C#" %>
<script runat="server">
void Page_load(object Sender, EventArgs e)
{
// Discover if SKU QueryString contains a value
string SKU = Request.QueryString["SKU"];
if (SKU == "")
Response.Write ("NO SKU");
else
DataGrid1.DataSource = GetProduct();
DataGrid1.DataBind();
}
System.Data.DataSet GetProduct() {
// Connect to Database
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\\test\\database\\test.mdb";
System.Data.IDbConnection dbConnection = new System.Data.OleDb.OleDbConnection(connectionString);
// SQL
string queryString = "SELECT [Products].Title FROM [Products] WHERE ([Products].SKU = @dotnet.itags.org.SKU)";
System.Data.IDbCommand dbCommand = new System.Data.OleDb.OleDbCommand();
dbCommand.CommandText = queryString;
dbCommand.Connection = dbConnection;
//Request SKU # from Querystring then locate prodcut based on SKU #
System.Data.IDataParameter dbParam_SKU = new System.Data.OleDb.OleDbParameter();
dbParam_SKU.ParameterName = "@dotnet.itags.org.SKU";
dbParam_SKU.Value = SKU;
dbParam_SKU.DbType = System.Data.DbType.Int32;
dbCommand.Parameters.Add(dbParam_SKU);
System.Data.IDbDataAdapter dataAdapter = new System.Data.OleDb.OleDbDataAdapter();
dataAdapter.SelectCommand = dbCommand;
System.Data.DataSet dataSet = new System.Data.DataSet();
dataAdapter.Fill(dataSet);
return dataSet;
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<br />
<br />
<asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>
<!-- Insert content here -->
</form>
</body>
</html>
I am trying to pass the SKU from the page_load into the GetProducts();
Can someone please help me as I have been trying to work this out all afternoon.
Thanks for the help (any other comments about how to speed up or improve the code are much appricitated).
Muller
<script runat="server">
void Page_load(object Sender, EventArgs e)
{
// Discover if SKU QueryString contains a value
string SKU = Request.QueryString["SKU"];
if (SKU == "")
Response.Write ("NO SKU");
else
{
DataGrid1.DataSource = GetProduct(SKU);
DataGrid1.DataBind();
}
}
System.Data.DataSet GetProduct(String SKU) {
// Connect to Database
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\\test\\database\\test.mdb";
System.Data.IDbConnection dbConnection = new System.Data.OleDb.OleDbConnection(connectionString);
// SQL
string queryString = "SELECT [Products].Title FROM [Products] WHERE ([Products].SKU = @.SKU)";
System.Data.IDbCommand dbCommand = new System.Data.OleDb.OleDbCommand();
dbCommand.CommandText = queryString;
dbCommand.Connection = dbConnection;
//Request SKU # from Querystring then locate prodcut based on SKU #
System.Data.IDataParameter dbParam_SKU = new System.Data.OleDb.OleDbParameter();
dbParam_SKU.ParameterName = "@.SKU";
dbParam_SKU.Value = SKU;
dbParam_SKU.DbType = System.Data.DbType.Int32;
dbCommand.Parameters.Add(dbParam_SKU);
System.Data.IDbDataAdapter dataAdapter = new System.Data.OleDb.OleDbDataAdapter();
dataAdapter.SelectCommand = dbCommand;
System.Data.DataSet dataSet = new System.Data.DataSet();
dataAdapter.Fill(dataSet);
return dataSet;
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<br />
<br />
<asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid>
<!-- Insert content here -->
</form>
</body>
</html>
Im not a C# programmer so the syntax might be wrong, but I would pass the SKU in as a parameter to the GetProduct routine...like GetProduct(SKU)
and update the query to something like:
string queryString = "SELECT [Products].Title FROM [Products] WHERE ([Products].SKU = " + SKU + ")";
Of course, you would need to change the function so you could pass in the SKU...OR you could create a module level variable and change that variable in your page load, and use it in your function.
MajorCats
thankswessamzeidan that works great.
MajorCats - Thats exactly the way I use to do it in ASP but in one of my ASP.NET books it says to do it this way to try and reduce the risk of SQL injection attacks. I need to look into this more but if anyone has any thoughts please email/reply to this post
Thanks again
Muller
Passing a struct to a function
I'm attempting to pass a structure to a function. The structure definition in the .aspx file and the dll are indentical. The approach looks correct, but I get this error:
Value of type 'ASP.processing_aspx.transDetails' cannot be converted to 'app.Settle.transDetails'.
Is this possible or is there a better method of passing a large number of parameters to a function?
The submitting code:
<script runat="server" language="VB"
Structure authResultsStruct
Dim Approved As Integer
Dim ErrorMsg As String
End Structure
Structure transDetails
Dim ClientID As Integer
Dim CardName As String
Dim CardNumber AS String
Dim ExpDate AS String
Dim Amount AS Double
Dim Address AS String
Dim Stripe1 AS String
Dim Stripe2 AS String
Dim Invoice AS String
Dim Zip AS String
Dim BankAccount AS String
Dim RoutingNumber AS String
Dim Created AS String
Dim PaymentType AS Integer
End Structure
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim payment AS transDetails
payment.ClientID = Request.Form("ClientID")
payment.CardName = Request.Form("CardName")
payment.CardNumber = Request.Form("CardNumber")
payment.ExpDate = Request.Form("ExpDate")
payment.Amount = Request.Form("Amount")
payment.Address = "1234"
payment.Stripe1 = Request.Form("Stripe1")
payment.Stripe2 = Request.Form("Stripe2")
payment.Invoice = Request.Form("Invoice")
payment.Zip = Request.Form("Zip")
payment.BankAccount = Request.Form("BankAccount")
payment.RoutingNumber = Request.Form("RoutingNumber")
payment.Created = Request.Form("Created")
payment.PaymentType = Request.Form("PaymentType")
Dim results AS authResultsStruct
Dim auth As New Settle()
'Dim myDataGrid
results = auth.Authorize( payment ) As authResultsStruct
Console.WriteLine(results.Status)
Console.WriteLine(result.ErrMsg)
End Sub
</script
Here is the function with struct definition:
Structure transDetails
Dim ClientID As Integer
Dim CardName As String
Dim CardNumber As String
Dim ExpDate As String
Dim Amount As Double
Dim Address As String
Dim Stripe1 As String
Dim Stripe2 As String
Dim Invoice As String
Dim Zip As String
Dim BankAccount As String
Dim RoutingNumber As String
Dim Created As String
Dim PaymentType As Integer
End Structure
Public Function Authorize(ByVal payment As transDetails) As authResultsStructJust because your type definitions are identical doesn't make the compiler think its dealing with the same types. Put the structure definition in a common code file in the app. That way the page and the code behind know they are dealing with the same type definition.
That's sounds like what I need to do. Is there a way to store data definitions so both aspx and dlls can share it?? I'm new to .net.
Thanks
fishin
Sure, define the struct in the dll and set a reference to the DLL in your project with the ASPX pages.
I'm not sure how to do that, can you show me the syntax?
Les
You do it in the GUI. Open your web project with the ASPX pages and then add your DLL project. Click on references in solution explorer -> Right Click ADD Reference click on Projects and then set the reference. Alternatively you could sign the DLL and then install it in the GAC and set a reference to it. Either way could be appropriate if you are using the DLL as a global object for several projects.