|
|
No i am not using smtp. i am using HTTPRequest. using http 1.0 protocols
With Regards,
Mayank Prajapati
MCP, MCTS
Sr. Software Engineer
JCTWeb India
www.jctweb.com
|
|
|
|
|
Hi,
I am trying to send mail using Collaborative Data object (CDO). I want to store my mail in the outbox and i need to set a deferred time parameter to it. At the specific time, the messages stored in the outbox have to be sent to the recipients.
I could not open the outbox of my exchange server.
i am getting the following exception thrown..
The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
any help would be highly appreciated.
thanks,
Dhina
|
|
|
|
|
i have made a field in my database called "StudentID".
and i've set it to "Primary key" and automatically increment it
by 1.
my problem is that whenever i delete a data and insert a new one, it
will increment it with reference by the last data.
for example, when i have three data key-in the "studentID" will now be "3".
but when i delete all the data and key-in a new one, the "studentID" will start
at "4". how can i reset that number so that it will start at "1".
thanx.....
BTW, i'm using Visual Web Developer 2005 Express Edition.
ASP.net-vb
|
|
|
|
|
you can do it using this:
DBCC CHECKIDENT ('tablename', RESEED,1)
Best Regards,
Apurva Kaushal
|
|
|
|
|
mmm!@# wrote: i have made a field in my database called "StudentID".
and i've set it to "Primary key" and automatically increment it
by 1.
What is the use of making identity column to primary key. It is already primary key. Identity values won't repeat. So I think no need of setting that as primary key
|
|
|
|
|
do you mean that it automatically set that field as a primary key.
but, correct me if i'm mistaken.
if a field is a primary key, it will have a small key symbol next to it.
|
|
|
|
|
mmm!@# wrote: do you mean that it automatically set that field as a primary key.
No what I mean is it is not primary key. But no need of setting that to primary key because identity column won't repeat the same values automatically.
mmm!@# wrote: if a field is a primary key, it will have a small key symbol next to it.
Yes you are correct
|
|
|
|
|
Actually, that's the way it was designed...for a very simple reason...if every time you wanted to do an insert, the db had to scan a table and find gaps in IDs, that process could take some time....(think 1M+ records in a table)
It does beg the question, why do you really care what Id is assigned, as long as one is? You're not going to be showing it to the user (ARE YOU!!!!) so really it doesn't matter!
The only reason I could think for wanting to do this is for touchy clients who insist on indexes starting at zero....that can be achieved as other posters have pointed out
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hello all,
Can any one please help me. I want an asp.net application which on button click checks for existing msn or aol messenger application on my pc and runs it, if not found displays message you have not installed msn messenger on your computer.Any help will be appreciated.
thanks.
|
|
|
|
|
Hi there!
Can you people help me in using an Xml file as a Database...
Thank you.
|
|
|
|
|
You can't run SQL on it, unless you can import it into a dataset. You'd use XPath to search it instead.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi i have two dates in my table,
03-23-2007 8:00:00
03-24-2007 8:00:00
I have two dropdown in my page use to filter between those two dates.
i used to convert the two dates into CHAR
CONVERT(CHAR(10),date,110) so the result is just "03/23/2007" and "03/24/2007" but the problem now is, when i filter the date like
SELECT * FROM table WHERE date BETWEEN '03/23/2007' and '03/23/2007'
returns no value but if my query is like :
SELECT * FROM table WHERE date BETWEEN '03/23/2007' and '03/24/2007'
it returs value but only the rows with the date '03/23/2007'.
Any idea about that?
Bernie
|
|
|
|
|
I am tasked with creating a Spanish version of a working English web site. Is there a proper way to do this?
I'm thinking for ease I could duplicate the folder and change the text, but that doesn't seem like an easily scabale solution (when they come back and want two more languages added (or for sites > 10 pages)).
--G
|
|
|
|
|
The way our company works is that we create a string name for every string in the resource files. For example a string for Name on one page will be unique if it's in webpage1 as it's name will be webpage1.Name, which will then be different from a similiar string on webpage2 because the unique name will be called webpage2.Name etc.
We then have a Databast table which contains a unique string link (i.e. webpage1.Name as above) a Locale (i.e. English, Spanish etc) and then the localised (translated) string. We have a control which when a page is rendered iterates through each of the strings held in the resx file - works out what the unique name would be (i.e. on webpage1 it prefixes the name with webpage1 etc) and then based on the chosen locale it extracts the string from the database table and voila - localisable webpages.
There are probably many alternatives but the beauty of this is that since all the localised strings are stored as data - it can be exported, edited and added to simply through the db.
Plus you can write out the webpage in English - then deliver the strings from your db table to someone to translte into Japanese (for example) and then once the new Japanese strings have been imported you can then have a japanese version of your webite availabe without any rework on the website itself.
|
|
|
|
|
I like that very much! I'll play around with it. Any chance of seeing that code for the control (glenn_lanier at netzero dot net)?
Thanks for the idea - means a little more work to retrofit, but will make going forward much easier.
--G
|
|
|
|
|
Mark,
In working on this, I've created a literal for each of my bits of text (<asp:literal id="ABCDUnique">blah blah blah). I have other literals that are updated based on code execution, so that is the reason all literals start with ABCD.
In Page_Load, I do something like:
string pageName = "UniqueName";
languageCode = 1;
TranslateControls(pageName, this.Controls);
I then define the TranslateControls method as:
private void TranslateControls(string pageName, ControlCollection controls)
{
for (int i=0; i < controls.Count; i++)
{
Control ctrl = controls[i];
if (ctrl.HasControls())
{
TranslateControls(pageName, ctrl.Controls);
}
else
{
if (ctrl.GetType() == typeof(System.Web.UI.WebControls.Literal))
{
if (ctrl.UniqueID.StartsWith("ABCD"))
{
Literal litTemp = (Literal)ctrl;
Database db = new Database();
string textTranslation = db.GetText(pageName, ctrl.UniqueID, languageCode);
litTemp.Text = textTranslation;
}
}
}
}
}
Problem is, some controls are ignored -- when logging/stepping through, it appears that they are not part of the ControlCollection. Any thoughts/ideas?
Thanks,
Glenn
--modified to correct cut-and-paste error in sample
|
|
|
|
|
When page is initially loaded, all controls are displayed properly. However, on postback, some controls are missed and appear blank (odd, as they have initial text, and the db.GetText method returns either valid text or ctrl.UniqueID surrounded by underscores).
|
|
|
|
|
I need to fill a dropdownlist with 1 to 60. So I did it by doing the following code:
for(int i=0; i <=60; i++)
DropdownList1.Items.Add(new ListItem(i.ToString(), i.ToString()))
However, I was thinking this probally is not good idea to use "new ListItem" each time. So I replace the above with the following:
ListItem li = new ListItem();
for(int i=0; i <=60; i++)
{
li.Text = i.ToString();
li.Value = i.ToString();
DropdownList1.Items.Add(li)
}
But the result turned to be all the items in the list are 60. Is there anything in the second code wrong? I have seen people using the first code all the time, but bot the second code. Does anybody know why? Could anybody give me some ideas why the second code doesn't work?
What's the life cycle of the new item when using
DropdownList1.Items.Add(new ListItem(i.ToString(), i.ToString()))
The last IMPORTANT question is: Does using "new listitem" will cause performance issue, such as more memory allocation, etc?
I would really appreciate any ideas!
Thank you in advance!
|
|
|
|
|
In the second code you add the SAME list item 60 times. Now if you change the items text and value you change ALL items.
Everytime you add that listitem to the dropdownlist you add a REFERENCE and NOT a COPY to the list. You could, for example, add that listitem to another dropdownlist without any problems. And changing it would change the value in both dropdownlists.
I hope i could help you.
If not just say it
|
|
|
|
|
Thanks for your respones.
It looks like the first approach is the only way to programmatically adding item to asp:dropdownlist.
|
|
|
|
|
vicky457 wrote: The last IMPORTANT question is: Does using "new listitem" will cause performance issue, such as more memory allocation, etc?
Yes, it means you end up with 60 items, which is what you want. Otherwise, you have one item, which you keep changing the value of.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello all,
I've been searching all day for an article or tutorial on how to get data from a SQL Server 2000 database and export the data to excel 2003 so that multiple worksheets are created, and information is displayed in these worksheets. Data will be coming from multiple tables, and I'm using C# and asp.net 2.0. User will click on an asp.net button to pull the data and put it in an excel spreadsheet.
Thanks
|
|
|
|
|
I am trying out VS 2005 for the first time.
Didn't really like the website project, and installed the update for 'Web Application Project' to try it out.
But I am NOT able to view the Web Application Project in the project types when I try to create a new project?
Any help, what could I be missing?
Thanks in advance,
atul
|
|
|
|
|
Did you reboot?
Wep application project appears under the C# templates when I create a new project.
|
|
|
|