|
Hi,
Actually connect to the database properly means first you create the database that database name you will give in your in connection window(username, password and database name)
1. goto in visual studio.
2. server explorer
3. data connection after that right click and click add connection
4. select your server name means system name(automatically will come).
5. use sql server authentication(give ur uname and pass word must correctly)
6.select data base name.
7. test connection.
|
|
|
|
|
I'm using Windows authentication, but I will try it with a username and password. I am curious as to whether we can still use Windows authentication or not?
|
|
|
|
|
i need to run two different versions of CR in my system. i have tried copying the dll files in to the bin folder also changed the reference to the bin folder. what actually happened is i can run the old version (CR 10) by copying the rpt file developed in VS2005. But at that time i can't use the CR13. DLL hell issue is raised, Can any one suggest me a better solution for my current issue.
|
|
|
|
|
i have use master page in my project.
I have click the button get the query in sql server 2005 in display the result in Gridview. that how to loading image in my click button?
|
|
|
|
|
Hello again. For last three hours I try to create a "httpHandler". IIS 7.5, .NET 2.0, Integrated mode.
My web.config:
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="version" type="Handler"/>
</httpHandlers>
<compilation debug="true"/>
<httpRuntime/>
</system.web>
</configuration
I get an error 500:23 "The application defines configuration in system.web.httpHandlers, migrate it to system.webServer.
Of course I tried it but with no luck (configuration is invelid). Tried also moving entire config to system.webServer.
What have I been missing?
Greetings - Jacek
modified 17-Sep-13 9:37am.
|
|
|
|
|
how to manually populate my below model from mvc action method. please help with code. thanks
namespace MvcPractise.Models
{
public class Student
{
[Required(ErrorMessage = "First Name Required")]
[Display(Name = "First Name :")]
[StringLength(5, ErrorMessage = "First Name cannot be longer than 5 characters.")]
public string FirstName { get; set; }
[Required(ErrorMessage = "Last Name Required")]
[Display(Name = "Last Name :")]
[StringLength(5, ErrorMessage = "Last Name cannot be longer than 5 characters.")]
public string LastName { get; set; }
[Required(ErrorMessage = "DOB require")]
[Display(Name = "DOB :")]
[DataType(DataType.Date)]
public DateTime Dob { get; set; }
[Required(ErrorMessage = "State Required")]
[Display(Name = "State :")]
public List<State> State { get; set; }
[Required(ErrorMessage = "City Required")]
[Display(Name = "City :")]
public List<City> City { get; set; }
[Required(ErrorMessage = "Language known Required")]
[Display(Name = "Language known :")]
public List<Language> Language { get; set; }
[Required(ErrorMessage = "Sex Required")]
[Display(Name = "Sex :")]
public List<Sex> Sex { get; set; }
[Required(ErrorMessage = "Computer Course Required")]
[Display(Name = "Computer Course Done :")]
public List<ComputerCourse> ComputerCourse { get; set; }
}
public class State
{
public string ID { get; set; }
public string Name { get; set; }
}
public class City
{
public string ID { get; set; }
public string Name { get; set; }
}
public class Language
{
public string ID { get; set; }
public string Name { get; set; }
}
public class Sex
{
public string ID { get; set; }
public string Type { get; set; }
}
public class ComputerCourse
{
public string ID { get; set; }
public string Type { get; set; }
}
}
tbhattacharjee
|
|
|
|
|
create an object of this model and assign values as required inside the action method.
More information please.
|
|
|
|
|
I need to create a new Web Service which uses libraries which are already deployed. I do not have a source code for the Website since it was created by an external company. So... I have installed a Visual Web Developer 2012 Express in hope to find a way to create and attach the service to an existing ASP server.
So, how to
* create the web serive and get it running on the existing server using Visual Web 2012 Express. The Web Service needs to respond on a specified URL with some JSON data.
Thanks in advance.
EDIT: I had panicked, but a simple restart solved the "problem" which I described before.
Greetings - Jacek
modified 17-Sep-13 5:09am.
|
|
|
|
|
Good day fellow developers,
I would like to ask your opinion on what would be the best approach for a web service to receive tabular/grid like data from the application/page that will be using the web service. The design of the web service should not be .net dependent and can be used by other platforms like java.
Does having a Dataset data type as parameter in the web method able to achieve this and still able to be of use if used in java etc?
Please do note that what i am referring as web service is the asp.net web service not wcf.
modified 17-Sep-13 5:13am.
|
|
|
|
|
You can use XML and pass it as string to the Web Method and the Web method can return an XML as a string, and in your Web Service you can use XmlWriter to generate you XML.
|
|
|
|
|
Thank you very much for the response Blikkies,
What are you saying the web Method will just have a string parameter.
The calling application will create an XML string then send it to the web method.
Did I got it right?
|
|
|
|
|
That's correct.
I used it for IOS, Windows Phone and Android apps, where the phone apps send XML as a string to the web method and the web method generates the requested data using XmlWriter and return it as a string.
The only thing is is that if your data is sensitive, it is not secure of using web methods so it's better to connect the web service using SSL urls and province username and password with every call.
|
|
|
|
|
Blikkies
Thank you for the suggestion.
Since I will be using string, I can make a pattern of my own to add security. the new pattern will be included in the web method's documentation.
Yes, every call of the web method should be secured. The system admin will be the one in charge on it. Though i will include code level validations.
Happy coding!
|
|
|
|
|
Good day everyone! Please I need help. I wrote web application with asp.net. Now when I tried to preview it with web browser, it is the asp.net default page that will display instead of my homepage. Please how can I make my homepage the default page when opened with the webbrowser. Emmanuel!
|
|
|
|
|
You can do this by editing you web.config:
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="home-page.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
if you web.config already have system.webServer tag, then just add:
<defaultDocument>
<files>
<add value="home-page.aspx" />
</files>
</defaultDocument>
|
|
|
|
|
Thanks blikkies for your respond. But please you still have to make it clear. How can I edit the web.config and where can I paste the codes you wrote. Sorry if I asked alot.
|
|
|
|
|
Do you have a web.config in your root folder? and what IDE do you use e.g. Visual studio?
And are your website hosted on IIS?
|
|
|
|
|
I don't understand at all how I'm suppose to use this code to handle the invalid postback or callback error from System.Web.UI.ClientScriptManager.ValidateEvent
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) _
Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
Try
Page.ClientScript.ValidateEvent(ib_BasicApply.UniqueID)
_cbMessage = "Correct event raised callback."
Catch ex As Exception
_cbMessage = "Incorrect event raised callback."
End Try
End Sub
' Define method that returns callback result.
Public Function GetCallbackResult() _
As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
Return _cbMessage
End Function
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
Page.ClientScript.RegisterForEventValidation(ib_BasicApply.UniqueID)
If Not Me.Context Is Nothing Then
RenderContents(writer)
Else
RenderDesignMode(writer)
End If
End Sub
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
MyBase.OnInit(e)
Dim cbReference As String = cs.GetCallbackEventReference("'" & Page.UniqueID & "'", "arg", "ReceiveServerData", "", "ProcessCallBackError", False)
Dim callbackScript As String = "function CallTheServer(arg, context) {" & cbReference & "; }"
cs.RegisterClientScriptBlock(Me.GetType(), "CallTheServer", callbackScript, True)
I have a form to enter a part. I have a category drop down, and a sub category drop down. So when you select a category, it uses JQuery to populate the subcategories. But Since the server did not load the list, using an update panel or autopostback, the server is say no, form validate error. The form is so big, it would take forever for the update panel round trip.
The part I don't understand, do I just use this code as is, or Am I suppose to program my sub category script in it instead of the CallTheServer.
|
|
|
|
|
I want to a c# code in asp.net for hotmail,gmail credentials for authentication and logging in to my asp.net webpage and at the same time I want to get all contact list of email from Gmail,Hotmail in the ASP.NET and C#.
it should redirect back to my webpage after the perfect authentication with all the contactlist.
|
|
|
|
|
Hi,
You need to use OpenID authentication for enabling GMail authentication integration. Please check http://dotnetopenauth.net/[^] library to integrate authentication. And you can also refer SocialAuth.Net[^] third party library for many more authentication integration.
Thanks
-Amit Gajjar
|
|
|
|
|
Please help me with problem that changed my life to dark side for last weel
I have done the asp.net razor application with Visual Studio 2012 Express for Web, also i have Windows Server r2 with iis to implement my site-application in inner corporation network.
My problems are:
1) i dont know how to manage my project in VS
2) i dont know what files to take from my project
3) and at last i wont to understand how use them in IIS
I havnt got much knowledg in Web, and will be glad to hear someone good knowledg spec help me!
|
|
|
|
|
Hi,
There is no more major difference in publishing normal web application and MVC razor application.
Please check this[^] article for publishing your application on server. There are many other articles on net for publishing web application. Read some MSDN articles as well. Best luck.
Thanks
-Amit Gajjar
|
|
|
|
|
I am trying to built a private web chat application in asp.net,I cannot have singlR please give me any other solution to built private web chat application in asp.net
kartik
|
|
|
|
|
You can explore other techiques like Web Sockets (directly) / CometD / SockJS etc.
|
|
|
|
|
How can I add <summary> comment as soon as I create a method?
I know that when we create a method and when we type "///" then this comment will get appear.
Instead <summary> comment should get added automatically when I hit "}" to complete a method.
Is there any way to do that? Please let me know.
|
|
|
|