|
i am geting value from datbase with this code CONVERT(varchar(11), TH_DT_HolidayDate) AS Expr1 and output is jan 15 2009 . but i want output like jan 15,2009 .how can i do this .thnx in advance.
|
|
|
|
|
The way you're doing this, it's a SQL question. Return a date time instead and use the ToString method to return the date formatted as you'd like.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
CONVERT(varchar(11), TH_DT_HolidayDate , 18)
may be 18 not sure , u can change this digit from 10 to 19 and then check them
|
|
|
|
|
|
Am trying to create a tutorial app from asp.net site which demos the Movie database utilizing MVC in asp.net. When I create my project and database, I right click on the Controllers folder (Created automatically by the project when making new project) I should see a "Add Controller" menu item. It does not show up on my pc, but does show up on another system, also using vs2008. Any ideas on what I need to do to remedy this problem?
Dale
|
|
|
|
|
Hi, i have a problem with vs(visual studio) 2008 creating subprojects.
I want to have a main web application and under it i want to have sub web applications.
The sub web applications must not have web.config file.
They must use the main application's web.config.
I could do this with vs 2005 but not with vs 2008
When i start to debug one of sub applications, it tries to creat a web.config file
Does anyone have an idea about what am i doing wrong?
|
|
|
|
|
Create one project, then add subfolders. Of course, you need to load your main folder and all of your projects, just to work on one. Surely that was the same in VS2005 ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi,
i m developing an email application for a private domain. The composing email part has completed but how to do the inbox related work? what kind of code is needed to retrieve email from server to user's account.
regards-
Sandip
|
|
|
|
|
|
Hi,
I've created a web service and to test it, I've created an ASP.NET page within the same solution.
When I run it in debug, I can browse to my page and submit some information to the web service. I can then follow the call into the web service in debug but I get an error due probably to the credentials - I'm using Sharepoint in my web service.
At that point, I think I need to set some credentials on the web service like this:
MyWebService.Service myWebService = new MyWebService.Service();
myWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;
The trouble is, that there's no Credentials property on the web service for some reason. It's odd because when I create a separate test harness and reference the web service, the Credentials property is available.
Can anyone help? I think I'm missing something fundamental here
|
|
|
|
|
errror generate when the data reader read.i have made the login project,
the error write that
(Incorrect syntax near the keyword 'user')
. but there is not a problem in table name because i have change it to users than it will give different error
the error occurred in loReader = loCommand.ExecuteReader()
Imports System
Imports System.Data.Sql
Imports System.Data
Imports System.Data.SqlClient
Partial Public Class _Default
Inherits System.Web.UI.Page
Public Shared lsConnectionString As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
Dim loConnection = New SqlConnection(lsConnectionString)
Dim loCommand As New SqlCommand("SELECT * FROM user", loConnection)
Dim lsUsername, lsPassword, lsUserType, lsstatus, lscount As String
Dim loReader As SqlDataReader
'Dim abc As IDataReader
loConnection.Open()
error here loReader = loCommand.ExecuteReader()
'abc = loCommand.ExecuteReader()
loReader = loCommand.ExecuteReader
While loReader.Read()
lsUsername = CStr(loReader("username"))
lsPassword = CStr((loReader("password")))
lsUserType = CStr((loReader("usertype")))
End While
loConnection.Close()
End Sub
End Class
|
|
|
|
|
User is an SQL keyword. Either you have mispelt your table name or you are in the wrong direction.
|
|
|
|
|
Hi, what u can do is replace
SELECT * FROM user with
SELECT * FROM [user]
then it will get recognized as a table name...
living life on the flip side
|
|
|
|
|
In the current project I am working on, I have an image control that displays an image from a remote url what the user inputs into the site's database. Since these are remote url's, if the remote site pulls that image down I want to display my no-photo.jpg to indicate to the user on my site that they will need to find another photo to use. I've been looking at the members of the Image control class and I can't seem to find anything there that can help me. Does anybody know what I can do with this issue?
|
|
|
|
|
I want to bind <asp:checkbox xmlns:asp="#unknown"> control in <asp:listbox> control dynamically. means the listitem will bind from database table and with each listitem there should be a checkbox. Please let me give some idea how i can do this?
|
|
|
|
|
Hi pals,
Im reading the data from word dco using Com DLL(Word.ApplicationClass ).but it throws the folowing error while im reading can any one assist me on this
System.Runtime.InteropServices.COMException (0x800A13E9): There is insufficient memory. Save the document now. at Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible) at RegisterNow.ReadWordDocument(String FilePath) in
and also here my code
//{
// try
// {
// Word.ApplicationClass wordApp = new Word.ApplicationClass();
// // Input box is used to get the path of the file which has to be uploaded into textbox.
// object file = FilePath;
// object nullobj = System.Reflection.Missing.Value;
// // here on Document.Open there should be 9 arg.
// Word.Document doc = wordApp.Documents.Open(ref file,
// ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
// ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
// ref nullobj);
// // Here the word content is copeied into a string which helps to store it into textbox.
// Word.Document doc1 = wordApp.ActiveDocument;
// string m_Content = doc1.Content.Text;
// // the content is stored into the textbox.
// doc.Close(ref nullobj, ref nullobj, ref nullobj);
// return m_Content;
// }
// catch(Exception ex)
// {
// Response.Write(ex.ToString());
// return "";
// }
//}
|
|
|
|
|
how can Retrieve data from database use store procedure
user input id and fill all the controls
plz give me example and how to write Query with code
and pass the parameter in store procedure
|
|
|
|
|
Google is broken where you live ? Or do you just not have a clue and so can't understand the tutorials on the web ?
Oh, it's you. I know from past experience, you're just too clueless to be here, you are part of the bottom end of the outsourcing boom, you've taken a job and now you're trying to work out how to do it, or rather, hoping we will do it for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Since I started playing with CodeSmith, I read somewhere that embedding the ASP.Net engine in your winforms application is possible.
The $1,000,000 question that I can't google an answer for is HOW?
Can someone point me in the right direction?
Thanks
|
|
|
|
|
Well, I can't think about a practical use of it. Do you remember where you read it?
|
|
|
|
|
I got something here[^]. Is this what you are talking about?
|
|
|
|
|
That's it man!
OT:
I replied to your message 3 times, and not once did the reply get posted. Are you getting them?
|
|
|
|
|
No. i got only one mail for you last reply. Looks like something went wrong with CP.
|
|
|
|
|
Hello,
I have 2 ddl. If the selected index is changed at the first the website connects to the database and gets some data for the second one and binds it.
I have put the 2 controls in the same updatepanel but when i change the index in the first one the whole page refreshes. Help..?
|
|
|
|
|
set mode to conditional of update panel might be work if you work properly.
|
|
|
|