|
Hi
Guys i want my connection string to be encrypted in web.config , is there any way to do it, plzzzzz let me know ASAP, thankx in advance.
|
|
|
|
|
hi,
Use Cipher Data Class.
With Regards
Satips
|
|
|
|
|
You can write your own encryption logic, by using System.Security.Cryptography namespace. Go through the below links.
http://msdn.microsoft.com/msdnmag/issues/02/06/crypto/
http://www.codeproject.com/dotnet/encryption_decryption.asp
|
|
|
|
|
|
Hi
I need to setup a WIN XP machine as a Time server so that I can verify timming issues on a Web service from a Embedded device.
Any ideas?
Regards
|
|
|
|
|
|
Hello,
I am trying to create a simple email form for my schools web site. I have managed to create the simple script to send the info from the form as an email to myself. At the mo it just prints 'your msg has been sent success fully' on a white background, I would like the page to look like the rest of the website.
I have put the HTML that all the other pages use to display the main title and few other images but none of the images appear. I get the alt tags and it is laid out correctly.
Here is my effort: (try and be nice as I have no experience with scripting with ASP)
<% Option Explicit %><br />
<br />
<html><br />
<head><br />
<title>Message Sent</title><br />
</head><br />
<br />
<body><br />
<br />
<br />
<br />
<%<br />
Dim name, email, message, NewMailObj<br />
name=request.form("name")<br />
email=request.form("email")<br />
message=request.form("message")<br />
<br />
'create the mail object and send the details<br />
Set NewMailObj=Server.CreateObject("CDONTS.NewMail")<br />
NewMailObj.From = email<br />
NewMailObj.To = ""<br />
NewMailObj.Subject = "New message sent.." <br />
NewMailObj.Body = "Name: " & name & _<br />
"<br>Email Address: " & email & _<br />
"<br>Comments: " & message<br />
<br />
<br />
NewMailObj.BodyFormat = 0 <br />
NewMailObj.MailFormat = 0 <br />
NewMailObj.Send<br />
<br />
Set NewMailObj = nothing<br />
Response.write "Thank you for your comments"<br />
%> <br />
<br />
<table width="700" border="0" cellpadding="0" cellspacing="0" background="images/main/back_green_blue.jpg" align="center"><br />
<!--DWLayoutTable--><br />
<tr><br />
<td height="150" colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"><br />
<!--DWLayoutTable--><br />
<tr><br />
<td width="700" height="150" valign="top"><img src="images/main/title_welcome.gif" alt="Welcome to Newbridge School" width="700" height="150" /></td><br />
</tr><br />
<br />
</table></td><br />
</tr><br />
<tr><br />
<td height="128" colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"><br />
<!--DWLayoutTable--><br />
<tr><br />
<td width="102" rowspan="3" valign="top"><img src="images/main/4square.gif" width="102" height="100" /></td><br />
<td width="83" height="13"></td><br />
<td width="498"></td><br />
<td width="17"></td><br />
</tr><br />
<tr><br />
<td height="88"></td><br />
<td valign="top"><div align="center" class="tilte"></div><br />
<div align="center"></div></td><br />
<td></td><br />
</tr><br />
<tr><br />
<td height="27"></td><br />
<td> </td><br />
<td></td><br />
</tr><br />
</body><br />
</html> <br />
Cheers
Tom
|
|
|
|
|
What is the path to the "Success page"?
What is the path to the page from which you got the formatting?
What is the path to the image files?
|
|
|
|
|
The path for the success page is the dir where I store my scripts, which is correct (imo) as I am recieving emails to my account.
eggsovereasy wrote: What is the path to the page from which you got the formatting?
Not entirly sure what you mean here? The only formatting is done on the page in the HTML.
eggsovereasy wrote:
What is the path to the image files?
The path for the images is correct, I use the same path for all the other pages on my site.
Sorry if I have not answered your questions correct it's been about 5 years since I have attempted any kind of scripting (and that was in PHP)
I just want to get the success page looking like the rest of the website
Cheers for the help
Tom
|
|
|
|
|
Hi,
Lets say I have:
public class OrderItem
{
#region Private Variables
private Order m_Order; // Order object reference
#endregion
#region Properties
public Order OrderItemOrder
{
get { return m_Order; }
set { m_Order = value; }
}
#endregion
}
My ObjectDataSource looks like this:
<asp:ObjectDataSource id="odsOrderItems" TypeName="MyNamespace.BusinessLogicLayer.OrderItem"
SelectMethod="GetOrderItemsByOrderID" runat="server">
<SelectParameters>
<asp:QueryStringParameter Name="intOrderID" QueryStringField="OrderID" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
I have the following in a GridView control:
<asp:BoundField DataField="" HeaderText="Order ID">
<HeaderStyle CssClass="GridViewHeader" />
<ItemStyle CssClass="GridViewCell" />
</asp:BoundField>
Lets say I want to display the ID value of the Order objects ID property, how will I do this in the DataField?? Normally in code I would do it like OrderItem.OrderItemOrder.ID, but it gives me errors if I do it like this: DataField="OrderItem.OrderItemOrder.ID".
Please can someone help.
Regards
ma se
|
|
|
|
|
DataField is a name of a column in your datasource, you databind to a gridview.
It depends on an sql query you run, for example if you are quering database with this query:
SELECT customer, orderId, ... FROM ...
then you can set DataField attribute to DataField="orderId"
Generaly, it is name of a DataColumn.
Pilo
|
|
|
|
|
Hi,
I understand what you are trying to say, but it's not making any sense in what I am trying to do.
I have the following SQL statement in a stroed procedure:
SELECT
OrderItemID_PK,
WineID_FK,
OrderItemUnitPrice,
OrderItemQty,
OrderID_FK
FROM
OrderItems
WHERE
OrderID_FK = @OrderID;
I only need the wine ID to populate the Wine object. In my DA class I did it like this:
// Do connections and stuff here
while (dr.Read())
{
OrderItem objOrderItem = new OrderItem();
// Populate other fields
Wine objWine = Wine.GetWineByWineID(dr.GetInt32(1)); // Related Wine object
objOrderItem.OrderItemWine = objWine; // Required
}
OrderItemWine is a property in the OrderItem class that sets the Wine object. I declared the Wine object in the OrderItem class like this:
private Wine m_Wine;
And the property that sets this Wine object in the OrderItem class is:
public Wine OrderItemWine
{
get { return m_Wine; }
set { m_Wine = value; }
}
Like this I can retrieve Wine information, now how do I get the wine name into my gridview, if I didn't define a Coloumn as such for the DataField property??
Please help. I hope it is more clearer.
Regards,
ma se
|
|
|
|
|
You can try and add a separate function into the datafield template, that calls the name of the wine, using the id you got from the select query, for that specific field.
EG: As the following into your
GetNameForID(wineID) //Id for the wine name you want to add here
or how about using parent/child relationship repeater or datagrid?
|
|
|
|
|
Hi, Could anybody help me to extract Metadata about Flash Video File .flv file. i.e. how to extract details about a particular flv file.
Thanks in Adavnce..
|
|
|
|
|
How to register an assembly in asp.net web app?
How to register an assembly in asp.net web app?
How to re gister an assembly in asp.net web app?
|
|
|
|
|
Hi all
I am trying to insert data in .mdb file
I have 20 fields
If i insert 6 fileds it is working
But it is not working when i try to inserting 20 fileds
It is giving this error
"Syntax error in INSERT INTO statement."
Can any one help me
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
What is the code?!
|
|
|
|
|
Pls check the Names of the Column in the DB and Also in ur code.
With Regards
Satips
|
|
|
|
|
Satips wrote: Pls check the Names of the Column in the DB and Also in ur code.
I think you replied to the wrong person. I did not ask the original question.
|
|
|
|
|
It has nothing to do with the number of fields. You have just made an error when adding the other fourteen fields.
That is about as much as anyone can say without seeing the actual code.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
Sorry all of u
Actiually i didnt post my second error
Some times It is giving "Unspicified Error" in connection.open()
Or it is giving "Syntax error in INSERT INTO statement"
And i chk the insert statement also no errors in that
Plz chk my code
MYCODE
----------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Some.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "INSERT INTO Info(1,2,3,4,5,6,----------------20) values('" & 1.Text & "','" & 2.Text & "','" &
3.Text & "','" & 4.Text & "','" & 5.SelectedItem.Text & "','" & 6.SelectedItem.Text & "',--------------------- up to 20
fields)"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
No, that is not the code that you are using. You can not use numbers as names of objects, so it won't even compile. Also, you can not use numbers as field names in the database like that.
If you don't want to post the exact code that you are using, put together a working example that demonstrates the problem. There is no point in trying to find an error in a piece of code that is different from the code where the actual error is.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
My mean is not hide the code my fields name are to big thats y i put fields name as numbers to better understood
Plz chk this
MYCODE
---------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Names.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "INSERT INTO
Info(username,userpasswd,Name,email,try,loc,other,other1,num,yearwise,monthwise,skils,funarea,current,ug,pg,greatpg,RB,ugo
ther,pgother,postother,cpr) values('" & uname.Text & "','" & pass.Text & "','" & name.Text & "','" & email.Text & "','" &
c***ry.SelectedItem.Text & "','" & loc.SelectedItem.Text & "','" & other.Text & "','" & other1.Text & "','" & no.Text & "','"
& yearwise.SelectedItem.Text & "','" & monthwise.SelectedItem.Text & "','" & skilsmen.Text & "','" & Label1.Text & "','" &
currrent.SelectedItem.Text & "','" & ugrad.SelectedItem.Text & "','" & pggrad.SelectedItem.Text & "','" &
pggreat.SelectedItem.Text & "','" & RB.SelectedItem.Text & "','" & u1.Text & "','" & p1.Text & "','" & greatpg1.Text & "','"
& cpr.Text & "')"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
That's better. The problem is in the information that you left out in the previous post.
"Name" is a reserved keyword in Access.
"Current" is a reserved keyword in SQL, Jet and ODBC.
---
b { font-weight: normal; }
|
|
|
|
|
HI
I changed DB fileds still it is giving same ERROR
Plz Chk this code
MYCODE
---------
Dim sConnectionString
Dim objCmd As New System.Data.OleDb.OleDbCommand
sConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("DB22.mdb") & ";")
Dim objConn As New System.Data.OleDb.OleDbConnection(sConnectionString)
objCmd.Connection = objConn
objCmd.CommandText = "insert into user(uname,pass) values(" & TextBox1.Text & "," & TextBox2.Text & ")"
objCmd.Connection = objConn
objConn.Open()
objCmd.ExecuteNonQuery()
objConn.Close()
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|