Im using Ajax calender extender in my asp.net page on clicking asp.net button it show calender popup on selecting date its binding on textbox all are working fine,
what i need is i need to set shortcut for todays day.. on clicking button its show calender on press some keyboard it bind todays date in textbox..
I had created Data Entry webform. Data is stored in Database. I have created 'Date' coloumn in database table with data type datetime. I want to isnert todays date automatically when data is inserted through form in DataBase.My current query to store data in database is:
Just to test, I created a blank website and a blank web site project.
When I added a referece to web site by doing right click and add reference it added the dll inside a BIN folder but on ther other hand when I did the same for a web site project it created a reference folder for me and then added the dll under the reference folder.
is there a way that I can format a Date binded in a ListView?I have this snippet of ListView
[code]...
What I want is to Format that date to output something like this Oct. 20, 2010. Normally if it is a DateTime I can write something like this requiredDate.ToString("MMMM dd, yyyy") but inside the ListView binded data I cannot do that.I don't want to use OnItemDatabound. I just want it to be formatted inline.
The code below returns a dataset that I use in a Gridview. How can I modify my select statement to format the DateEntered as a Date in gridview with no time and TimeEntered as Time in gridview without date info?
One of my table columns is for date and I understand how to use the ORDER BY statement in general. But how would I have the gridview sort with only the future items (relative to the current date) apear and leave out the past entries?
What is the correct syntax in VB.net 2008 web developer in SQL to do a WHERE clause where the data is >= to the current date? I can't figure out how you pass now into the SQL statement.
I have a objectdatasource control with a field of date and time and I was wanting to know how you format the date to uk format with the select statement through my objectdatasource. And what type of integer is bigint in SQL?
Problem in code adds to the same div? I need it to add multiple divs of the same id.Atm it takes all the seperate entitys or colums in my database and places them in the one div called I was hoping it would add for each record in my database which is equal to the userid in my sqlsyntax.
How can I achieve this?
Code:
using (OdbcCommand cmd = new OdbcCommand("SELECT Wallpostings FROM WallPosting WHERE UserID=" + theUserId + "", cn))
using (OdbcDataReader reader = cmd.ExecuteReader()) [code]...
I have a master page that loops through form keys looking for a specific key:
[Code]....
Problem, if I use an UpdatePanel on a page when this code is hit the last form key is null. If I don't use an update panel, all is good. Why does the UpdatePanel send a null form key in the list?
I'm using Request.Files to obtain a file that the user is uploading on my web page.I noticed that if I use the filename property in IIS it gives me a path + filename, however if I run in cassini it only gives me the filename no matter what directory I use.Why is this? And, is there a way to just use the filename when in IIS?
I am attempting to call a RESTful service using an HttpWebRequest object via POST. I am attempting to pass 1 variable with the Request body which contains a url encoded string. I see the request when it hits the server; however, it shows 2 form variables. The first is Form[null] and the second is my variable.I am attempting to locate the source of this NULL key; however, I cannot. Any ideas on how I may be able to remedy this since it's throwing issues when I attempt to use it with the Nancy web framework for .Net.
Code:
var request = WebRequest.Create("http://localhost:8888/RouteName") as HttpWebRequest; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded";[code]...
I'm trying to have a View where the user can add items in a collection without having to go to a new View (the scenario is a sort of CV site where the user adds info about work experience, skills, etc, and it would seem absurd to go to a new View to add each little thing).
So I have an edit View that shows a number of text boxes for the already added items, and there's an ajax call to go to a method to fetch the collection fresh if the user adds an item.
I'm using the profile to store a users shopping cart which works fine. I now need a way for the site admins to create a cart, add items and checkout for a particular user.
I'm trying to access the users cart with this: Profile.GetProfile(lblUserName.Text).SCart
I first check to see if the user has a cart and create one if he does not and then add the item to the cart. I'm using the code below but get this error when attempting to add the item:
Object reference not set to an instance of an object.
Basically what i have is a button and i want this button to add value in database, i mean if the value in the database is 1 it adds 1 to it, so that the value becomes 2.
I have a InsertCommand function i am using to insert the dropdownlist in my updatepanel. When the Add button is clicked. It adds the record multiple times. Am not sure why it does this. Here is my code.
Dim Bank_number As DropDownList = UpdatePanel1.FindControl("ddlbank")Dim NoteAccountNumber As DropDownList = UpdatePanel1.FindControl("ddlAccount")' UpdatePanel1.ChangeMode(FormViewMode.Insert) lblsee.Visible = "true" 'now collect selected information on the drop down RelationshipTest.InsertParameters( RelationshipTest.InsertParameters( "bank_number").DefaultValue = ddlBank.SelectedValue.ToString"noteaccountnumber").DefaultValue = ddlAccount.SelectedValue.ToString'Insert into db RelationshipTest.Insert()
Also, i was woundering if any of you might know the logic behind clearing inserted data from the dropdownlist once its inserted. I am trying to make sure data is not entered mulitiple times. Unique Indexing comes to mind but thats only on the backend.
I've just installed VS 2010 RC and IIS7 with .NET framework 4.0 on a Windows 7 laptop (and I'm very new to this).
I'm trying to use Response.WriteFile to add a menu to an .aspx page, and it works but it also adds two square/unknown characters before the inserted text. Also, when I view the source of the displayed webpage in IE8, the source gets up to the point of the two squares, then shows an opening angle bracket (<) and then stops, although the rest of the webpage displays fine.
It doesn't matter whether the included file has any text in it or not, or whether it is an .html or .aspx file.
Response.Write doesn't have the problem.
(In FF and Opera, the inserted text is displayed as html code with a space (opera) or unknown character (FF) between each normal character. I'm not worried about those browsers as I'm developing soley for IE8)
On my asp.net page i use a multiline textbox to let users store some text... Sometimes users need to copy/paste email messages from outlook into the textbox. When they do that i looks like the textboxs add extra newlines?? How can i prevent this? Can i intercept a paste into a textbox and remove unwanted end of lines?
i call FormsAuthentication.RedirectToLoginPage() to redirect to login page. but there is one problem: this method adds a return url to query string.how should i disable this?