|
hkchauhan wrote: DateTime dt = (DateTime)(TypeDescriptor.GetConverter(new DateTime()).ConvertFrom(06-28-2007))
Why so much of typecasting?
DateTime dt = DateTime.Parse("06-28-2007"); should do
|
|
|
|
|
DateTime dt = DateTime.Parse(dateString);
dateString has to be in a format that Parse understands (see documentation).
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Try taking varchar in stored procedure and cast it as datetime for checking..i think it will work...
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Hi all
I was creating a Web form, by which the data will stored into a ms-access database table. In my database table there is a field ID which is autonumber but my id is not generated properly while working with the database, currently the values for ids are: -
1,2,3,6,7,13,15,16,30,34,35….
Means the ids are not generated into correct manner, What should I do for that.
Plz reply , Thanks in advance.
|
|
|
|
|
Dont repost your query.
It has already been answered
|
|
|
|
|
Sorry for reposting the problem,
but there is no delete operation will performe there i checked it for the same even there delete keyword available in my web form so how could it will be deleted.
|
|
|
|
|
this occur may be you deleted some records for example you 10 rows that has auto generated column you have deleted the i & 10 th record and if you insert the new row the autogenerated column will take 11 as the new record coz of built-in storedprocedure will do this. you have to drop and recreate you table to solve this problem
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
but there is no delete operation will performe there i checked it for the same even there delete keyword available in my web form so how could it will be deleted.
|
|
|
|
|
Are you using transactions anywhere, if you are then that might explain it since running a command in a transaction which is then rolled-back will result in gaps in identities
|
|
|
|
|
Hi Forum,
I was wondering if you would be able to give me some input on this
I have data grid which is displaying id, firstname and last name(Mind blowing stuff i know)
I currently hav text boxes from which if i enter the name or surname it will delete that record or add a new record.
But I would like to make it more user friendly and bit cooler, by populating buttons in each row, from which the user can delete a specific record by pressing the delete button for that row or edit the row by pushing the edit button.
From all the books and sites i can read this so called in place editing is carried out by using columns tag and <asp:boundcolumn>, but when i attempt to enter these tags it comes out with error messages that these aren't supported by certain browsers. So i am guessing that these books are out of date and that they hav been replaced by somthin else.
Any help would be much appreciated
Cheers
Boyindie
|
|
|
|
|
you can have button column in you datagrid. Right click you datagrid go to property builder their you can able to find column in left hand side select that after selecting you can find the button column in right side (select the column you want, it has edit, delete, update, cancel buttons). After selecting the button column go to you event properties of your grid column their you can fine events for edit, update, cancel and delete.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
boyindie wrote: I have data grid which is displaying id, firstname and last name(Mind blowing stuff i know)
The question you asked doesn't seems like mind blowing...
Most of us are doing it in most of our application. This shows you are a beginner to ASP.NET
|
|
|
|
|
Seems like you have executed some delete operations in between.
|
|
|
|
|
i have problem in Export data's in Datagrid to Excel
Deepi
|
|
|
|
|
What is the problem?
At least post some code. How do we guess?
|
|
|
|
|
haha!!!
True please atleast post the full question if you are interestedin getting an answer!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Hi,
I have a server control and I want to determine if the page is requested from the development computer (localhost) or remote computer. Is it possible to determine that ? Would you please show me sone snippet to do so ? I want to protect my server control demo version to use only for testing in localhost, not for production server.
Regards
Bashiwala
|
|
|
|
|
bashiwala wrote: Is it possible to determine that ?
Yes
bashiwala wrote: Would you please show me sone snippet to do so ?
string clinetIP = String.Empty;
clinetIP = Request.UserHostAddress;
Response.Write(clinetIP);
|
|
|
|
|
Dear Manas,
Thanks a lot for this favor.
Highly appreciate.
|
|
|
|
|
Hi,
While designing the web page suddenly the font size was increased in design view of VS-2005. The source view looks fine. When i run it, it shows the original size in browser.
Not only the current website but also the previously designed websites also has the same problem now.
Plz let me know where to correct the settings.
Regards,
Jagadeesh
|
|
|
|
|
hello everyone,
I have small doubt regarding a GridView.
I have a Grid View in .net. I want to show delete confirmation not through javascript but through C# code.Once Delete confirmation is selected the record should be deleted and if cancelled it should not be deleted.I am not using an ItemTemplate or CommandField but Instead i am using a AutoGenerateDeleteButton=True.i have to write all the code in c# only but not in design/html page. Plz help me in finding this code.It is very urgent.
ok byee
Murali
Murali
|
|
|
|
|
try with the following code
private void dg_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
//Check for Item and Alternate Items if(e.Item.ItemType==ListItemType.AlternatingItem || e.Item.ItemType==ListItemType.Item)
{
Button btn=(Button)e.Item.Cells[0].Controls[0];
btn.Attributes.Add("onclick","return confirm(‘Do you want to continue?’);");
}
}
Regards
Prakash-B
|
|
|
|
|
we can give confirmation in c# with javascript plz check it
u write this method in c# page
//create one method
public Message(string args)
{
Lable lbl=new Label();
lbl.Text=""+"<window.confirm(args)>"
}
when u double click the button and it will display the c# page u write the below code at last of the code in button.
Message="Display the message u want";
<div class="ForumSig">KIRAN</div>
|
|
|
|
|
we can give confirmation in c# with javascript plz check it
u write this method in c# page
//create one method
public Message(string args)
{
Lable lbl=new Label();
lbl.Text=""
+
"<window.confirm(args)>"
}
when u double click the button and it will display the c# page u write the below code at last of the code in button.
Message="Display the message u want";
<div class="ForumSig">KIRAN</div>
|
|
|
|
|
Hi all!
in my sample web application, i have make setting in web.config file for custom eror as:
<customerrors mode="On">
<error statuscode="404" redirect="Redirect.aspx">
in page load event of code file of Redirect.aspx, i have write following code:
string strCorrectPath = Request.QueryString["aspxerrorpath"].ToString();
string strPage = strCorrectPath.Substring(strCorrectPath.LastIndexOf("/") + 1);
Response.Redirect("http://192.200.12.19/projects/" + strPage);
when i run from local host it works good. but when i run it from IIS, then it doesn't work & not redirected to the URL: "http://192.200.12.19/projects/" + strPage, rather than it searching redirec page on my local system. whst is the problem?
Thanks & Regards,
SAMir Nigam,
Software Engineer,
STPL, Lucknow, India.
|
|
|
|