|
what about this tell me clear
suresh babu.k
|
|
|
|
|
i dont knowddd
suresh babu.k
|
|
|
|
|
dfgdsfgdfdghrtydfg
suresh babu.k
|
|
|
|
|
dhgfghfhfhf
suresh babu.k
|
|
|
|
|
fdsfsdtertdfdtert
suresh babu.k
|
|
|
|
|
|
Hai, getting ignored for the third time. If I am wrong on any part, please let me know. If you think I do not contribute and only ask, that's because I am not proficient enough to help. Shall wait for a lil longer. Anyway, thanks those who helped me before. And rest assured that I am not a student studying asp.net, I am working and currently helping ppl out.
------------------------------------------------------------------------------------------------
Hi all,
I am trying to send email from my website. If you use the createuserwizard tools from VS studio 2005, you have this mail definition as one of it's property. I want to send email through that to my registered user. I typed the following code into my web.config file.
<system.net>
<mailSettings>
<smtp from="k@hot.com">
<network host="mhub.n.edu" port="25" password="" userName="" defaultCredentials="True" />
</smtp>
</mailSettings>
</system.net>
Is the code correct? Because everytime I try to send email after registration, I get a "A socket operation was attempted to an unreachable network" error. Could it be my email server?
Btw, I changed my host name to prevent ppl from abusing it. Any Ideas? Thank in advance.
-=Kenzy=-
-- modified at 5:45 Friday 16th June, 2006
|
|
|
|
|
can anyone help in writing random password generation code in C#.
|
|
|
|
|
Check this ^
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Or just use the randomizer, but not the default (that will generate the same number every second).
Use the Random( (int)DateTime.Now.Ticks );
public static string GeneratePassword(int length)
{
string allowebChars = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";
Random rnd = new Random( (int)DateTime.Now.Ticks );
char[] chars = new char[length];
for (int i = 0; i<length; i++)
{
chars[i] = allowebChars[ rnd.Next( allowedChars.Length ) ];
}
return new string(chars);
}
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
I've had several posts here and there. I am VERY green so if someone can point me in the right direction.
I have an app where the user enters a part number. A datagrid comes back with info based on what the user entered. Okay, that part I have down.
Question 1: I want the screen to come back and say 'no part exists' and display a BLANK ROW where the user can start to enter information about the new part number. How do I do this?
Question 2: I found an article here that discussed using a reusable databinding function. Based on some other feedback here it got tweeked. It requires two parameters:
private void BindGrid (SqlCommand command, System.Web.UI.WebControls.DataGrid DGrid)<br />
{<br />
SqlDataAdapter adapter = new SqlDataAdapter(command);<br />
DataSet ds = new DataSet();<br />
adapter.Fill(ds);<br />
DGrid.DataSource = ds;<br />
DGrid.DataBind();<br />
<br />
}
So for example, when I click the button to retrieve the data, I call it like this:
private void btnSearch2_Click(object sender, System.EventArgs e)<br />
{<br />
strPartNumberInput2 = txtSearchPart2.Text;<br />
string SQLString = "SELECT c.cost, pt.description, dd.DrawingNumber, dd.DrawingRevision, dd.DwgPath FROM costs c INNER JOIN Parts p ON c.PartID = p.Id INNER JOIN PartTypes pt on pt.ID = p.PartTypeID LEFT JOIN DraftingData dd on dd.PartID = p.ID WHERE p.PartNumber = @PartID";<br />
SqlCommand cmd = new SqlCommand();<br />
cmd.Connection = new SqlConnection(strConnectSQL);<br />
cmd.CommandText = SQLString;<br />
cmd.Parameters.Add ("@PartID", strPartNumberInput2);<br />
BindGrid(cmd, DataGrid2);<br />
}
Now I'm getting into the edit, update, cancel functions (again looking at documentation out there) such as:
public void DataGrid2_edit (object sender, DataGridCommandEventArgs e)
{<br />
DataGrid2.EditItemIndex = e.Item.ItemIndex;<br />
BindGrid();<br />
} In this example there are no parameters.
How would I pass the parameters? Do I have to repeat all the sql command and connection stuff each time?
|
|
|
|
|
Hi.
I have an application which requires a secure channel for just certain pages. I was able to do this selectively in IIS with no problem, except that the (non-secure) custom error page I defined in my web.config no longer works when an exception is thrown in one of the secure pages. It wants me to authenticate (even though these pages are set to allow anonymous access), after which I'll get the standard access is denied error.
I tried setting the defaultRedirect property in the web.config file to include the full Url, i.e., defaultRedirect="https://myDomain/myApp/genericErrorPage.htm", but then the non-secure pages have trouble accessing the custom error page. I get an HTTP 401.2 error:
"You do not have permission to view this directory or page using the credentials that you supplied because your Web browser is sending a WWW-Authenticate header field that the Web server is not configured to accept."
Is there a way to have non-secure and secure pages within the same app, while using custom error pages?
|
|
|
|
|
Please could anyone help me out on this.
I need HTML code to store multiple file name in the database when multiple browse buttons are used.
the HTML page should have multiple browsers, for example Prof Signature field will have one browse button and Dean Signature field will have another browse button, the values selected values of these two should be stored in the database.
|
|
|
|
|
please help me to get data into dropdownlist from the database table.
|
|
|
|
|
SqlConnection c = new SqlConnection(stringconection);<br />
c.Open();<br />
DataSet ds = new DataSet();<br />
SqlDataAdapter da= new SqlDataAdapter ("select command",c);<br />
da.Fill(ds);<br />
Dropdownlist1.DataSource = ds.Tables[0];<br />
Dropdownlist1.DataValueField = "Column1";<br />
Dropdownlist1.DataTextField = "Column2";<br />
c.Close();
|
|
|
|
|
Goto DropdownList's properties and DataValueField put the PK of Database and DataTextField put the column name which u want to display form Database.
Then Write Method as:
DataSet ds = GetValuesFromDB();
DropdownList1.DataSource = ds;
DropdownList1.DataBind();
ListItem lst = new ListItem("All Values", "0");
DropdownList1.Items.Insert(0, lst);
Where GetValuesFromDB() will contain sql which will return Dataset.The query will have PK and the column name which u want to display.
I hope this will help u.
Thanks and Regards.
|
|
|
|
|
Hi, I have this question about static instances of classes:
Is a static instance of a class unique at the Application level, or there is a different instance for every session?
In other words, does a static field of a non-static class behave like it was in the Application["..."] object dictionary?
Thanks.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
|
Thanks, in fact I have did a test and it behaves that way. Cool.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
A static instance is just a static reference to a regular instance of the class. Therefore it has the same scope as any static variable.
A static variable is unique at the application level.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: A static variable is unique at the application level.
Cool. I did a test and in fact it works that way.
Thank you.
______________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA] and the ScrewTurn Software experiment
|
|
|
|
|
I am working on an ASP.NET project where I make a call to a database. I know how to create a key in the web.config file to point to the actual server, but I made a copy of the database on my local computer and want it to point to that.
Real Server:
<add key="ConnectionString" value="Data Source=SERVER-SQLSC1;Initial Catalog=Parts;User ID=user;Password=morecowbell" />
What I tried for localhost:
<add key = "ConnectionString" value = "Data Source = localhost;Initial Catalog=PartsDB;"/>
(I named the copy PartsDB to avoid confusion.)
What am I doing wrong here?
|
|
|
|
|
Just raise your arm and extend your finger in the direction of your pc...
or use server=(local)
|
|
|
|
|
add key = "ConnectionString" value = "Server=(local);Initial Catalog=PartsDB;"
Like that?
I've been having problems pasting...
|
|
|
|
|
You can try wrapping your code in code tags (formatting below the entry textbox).
And yes.
|
|
|
|