|
How to make Connection string in visual studio 2012 ?
|
|
|
|
|
|
here is a good reference site for writing connections strings
http://www.connectionstrings.com[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
in web. confg file..
you just write in <configuration> element before closing tag
write this
<connectionstring>
<add name="mycon" connectionstring="Data Source=<Your server name>; Initial Catalog=<Your Data Base Name>; User ID=sa; Password=<Your RDBMS Password>" providername="System.Data.SqlClient">
|
|
|
|
|
For window based authentication
<add name="dbserver" connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=databasename;Integrated Security =true;" />
For username and password authentication
<add name="connectionstringname" connectionString="data source=SERVERNAME;initial catalog=databasename;user id=username;password=123"/>
write above code in connection string tag in web config like
<connectionStrings>
<add name="dbserver" connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=databasename;Integrated Security =true;" />
</connectionStrings>
-- modified 28-Jan-15 7:22am.
|
|
|
|
|
i got an asp.net codes for a website whenever i tried to run the codes on my visual studio 2012 it keeps showing me the following error on the browser
Server Error in '/LovelyWebsiteLearn' Application.
This operation requires IIS integrated pipeline mode.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
System.Web.HttpResponse.get_Headers() +9681914
System.Web.HttpResponseWrapper.get_Headers() +9
Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +309
Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +246
Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +15
Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +288
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +285
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
how can u help me pls?
|
|
|
|
|
|
i want to retrieve date from SQL database using c# [Stored Procedure] and show all the value of Database in a grid.i don't know how to call this procedure in view. this is my Controller code :-
namespace sp_insert.Controllers
{
public class EmployeDetailController : Controller
{
//
// GET: /EmployeDetail/
public ActionResult Index()
{
Employee Employee = new Employee();
return View("DisplayEmployee",Employee);
}
public ActionResult DisplayEmployee(Employee Employee)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyDatabaseConnectionString"].ConnectionString.ToString());
con.Open();
SqlCommand cmd = new SqlCommand("spEmpSelect",con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteReader();
return View("DisplayEmployee",Employee);
}
}
}
|
|
|
|
|
I would suggest you to Google and learn MVC and Ado.Net first because the code simply reveals that the way you are trying to do is fundamentally wrong.
So, even if we answer your question, it won't help you.
|
|
|
|
|
actully i am very much clear about mvc and ado.net...but how practically implemented that i am not able to understand that's why i am asking you....
|
|
|
|
|
please any 1 provide me an Example of:"Insert , Display ,Update ,and Delete on Database in asp.net with MVC using Stored Procedure Example".i want to learn how actually application is working with database.
|
|
|
|
|
|
i want to retrieve date from SQL database using c# and show the value as a text property of a label. this is my code
string calidd = "select calid from calib where Tulname Like @myse";
cmd2 = new SqlCommand(calidd, con);
cmd2.Parameters.AddWithValue("@myse", se);
DateTime dt;
dar2 = cmd2.ExecuteReader();
while (dar2.Read())
{
dt = Convert.ToDateTime((dar[0].ToString()));
xxcd = dt.ToString("dd/MM/yyyy");
}
calibdlab.Text = xxcd;
There is No problem anywhere!.. you only lack Insight on How to provide the Solution.... Knowledge is Power..
|
|
|
|
|
|
I need to add a grid to a web page and implement auto scrolling for the grid. The grid should display a maximum of 15 rows and auto scroll showing each loaded row (0 - 100) at a configurable speed. The number of rows loaded to the grid will vary each time data is pulled from a database. Does anyone know how to automate scrolling for a grid using ASP.Net with VB.Net. Any advice would be greatly appreciated.
|
|
|
|
|
If you want to scroll vertically or Y
Then you need to wrap the control in a div element, and use CSS to control the scrolling
<div style="overflow-y: auto;">
</div>
If you want to scroll X or horizontal, replace Y with X
http://www.w3schools.com/cssref/css3_pr_overflow-y.asp[^]
|
|
|
|
|
Not what I am needing. I need to have the gridview data to scroll automatically with animation. Probably using JavaScript or CSS 3.0 animations. Thanks anyway for the advice, but the solution to my problem will be a bit more advanced.
|
|
|
|
|
You just said grid, wasn't' sure if your talking about individual cells, or the entire gridview object. Perhaps you should fine tune your question.
|
|
|
|
|
|
1. No
2. Read carefully the rules of this forum (top of the page)
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Annoying people you want help from is rarely a good way to start things.
And not reading clear instructions is a good way to annoy people.
So do as it says at the top of the page, and don't post technical questions here.
Post here instead: http://www.codeproject.com/Questions/ask.aspx[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Semi-useful answer:
If I could create a folder on your system from my web app, I'd be creating folders on your system until you ran out of hard drive space.
Rethink what it is you're trying to solve. I'm gonna leave it at that.
|
|
|
|
|
dandy72 wrote: If I could create a folder on your system from my web app, I'd be creating folders on your system until you ran out of hard drive space. Well, you're just not nice!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Only to people who post programming questions to the lounge
|
|
|
|
|
But watching people post programming questions to the Lounge is my favourite spectator sport!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|