 |
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
|
 |
Hello;
I'm working on a simple login form in c# in asp.net. I'd like to bind a key to the password and then save it in encrypted form. When the user logs in, he should enter his key and password. The key will be bind to the password and then compared to the one stored on the database.
Please help me with the binding process and encryption.
Thanks.
|
|
|
|
|
 |
How do I retrieve multiple sub category values from a single select statement?
I have the following code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
ddlParks.AppendDataBoundItems = True
Dim strQuery As [String] = "Select parkID, parkName from ParksCategory"
Dim con As New SqlConnection(strConnString)
Dim cmd As New SqlCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = strQuery
cmd.Connection = con
Try
con.Open()
ddlParks.DataSource = cmd.ExecuteReader()
ddlParks.DataTextField = "parkName"
ddlParks.DataValueField = "parkID"
ddlParks.DataBind()
Catch ex As Exception
Throw ex
Finally
con.Close()
con.Dispose()
End Try
End If
End Sub
Protected Sub ddlParks_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddlParks.SelectedIndexChanged
Dim strQuery As [String] = "select subcatID, subcatName from SubCategory" _
& "where parkID=@parkID AND Status=1"
Dim con As New SqlConnection(strConnString)
Dim cmd As New SqlCommand()
cmd.Parameters.AddWithValue("@parkID", _
ddlParks.SelectedItem.Value)
cmd.CommandType = CommandType.Text
cmd.CommandText = strQuery
cmd.Connection = con
Try
con.Open()
dr = cmd.ExecuteReader()
Do While dr.HasRows
lblfacility.Text = dr.GetName(1)
Do While dr.Read()
lblfacility.Text = dr.GetString(1)
Loop
dr.NextResult()
Loop
Catch ex As Exception
Throw ex
Finally
con.Close()
con.Dispose()
End Try
End Sub
When a user selects a category, there are at least two sub categories associated with the Park Category selection.
Any ideas why the WHILE LOOP I am using is not producing the correct result.
Assume that I have a categoryId of 251 and there are three values associated with this categoryId from subcategory table and assume those IDs are subcat1 subcat2, subcat3, the result being returned so far is subcat3. The first two are ignored.
Thanks in advance for your help.
|
|
|
|
 |
samflex wrote: why the WHILE LOOP I am using is not producing the correct result.
Because it's wrong?
|
|
|
|
|
 |
Elsewhere.
Do While dr.Read()
lblfacility.Text = dr.GetString(1)
Loop
You keep overwriting the same value, so it will always be left holding the last. What did you intend to get?
And I have no idea why you have the outer loop:
Do While dr.HasRows
|
|
|
|
 |
Even with this:
Do While dr.Read()
lblfacility.Text = dr.GetString(1)
Loop
dr.NextResult()
I am still getting the last value.
As stated in my original post, each category has atleast two sub category values.
In one instance, one categoryId has five (5) values.
I am hoping that the loop will list all five values or however many values from subcategory that are associated with a chosen category.
|
|
|
|
 |
Maybe you want to concatenate those values together and then display the result? (If so, use a StringBuilder.)
|
|
|
|
 |
Hello, I am developing a Web application using asp.net where am adding multiple window popup . Using button group, but problem is that once I write code for second link then the code for first link doesn't work.
|
|
|
|
 |
We can not help you without the relevant code...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
 |
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"/>
|
|
|
|
 |
Thanks guys I got the problem and it's solved .I'll post solution soon.
|
|
|
|
 |
I have the following regular expression. I need to add to allow
[] and '' ?
ValidationExpression="^[a-zA-Z0-9+'.#$&'%,“:;=/\(\),\-\s]{1,8000}$"
|
|
|
|
 |
Special characters can be used with escape char before...like \[ or \'...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
 |
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 element before closing tag
write this
|
|
|
|
 |
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 21 hrs ago.
|
|
|
|
 |
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.
|
|
|
|
 |
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!
|
|
|
|
 |
Mark_Wallace wrote: But watching people post programming questions to the Lounge is my favourite spectator sport!
I'm not sure whether that means you're disappointed in my initial response.
|
|
|
|
 |
Well,the answer is obviously "NO" as you can't take the OS level control of client.
Why do you want to create folder on client machine?
Please provide your requirement.
|
|
|
|
 |
Hello,
I'm pretty new to ASP.NET..
I'm creating Models using EF, and then creating controllers and views automatically, which is great.
What I want to achieve is that, I want unregistered users not to see create new/Delete/update links. Only admins should see those links and do those operations. How can I do that?
Thanks.
|
|
|
|
 |
What you need is authentication service. To authenticate the users before they can continue to those actions (Create/Delete/Update), and let only Admin users to continue and perform them by visiting those web pages.
You would find yourself at ease at this web page: http://www.asp.net/identity[^] ASP.NET Identity is the service by ASP.NET that can be used to authenticate users.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
how can i find iis manager in windows 8 .. i searched for (inetmgr) and in control panel .. and no result ??
|
|
|
|
 |
Sounds like it's not installed. Try searching for "Turn Windows Features on or off", and look under "Internet Information Services" -> "Web Management Tools" -> "IIS Management Console".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
 |
You have to install the remote tools for Windows 8.1 (RSAT TOOLS)
But they only work with Server 2012.
I did mine last year. It was tricky to install. But I was running server cores on Server 2012, so I had to setup permissions using powerscript and cmd line.
They also had rsat tools for Server 2008, but you had to be running Windows 7.
This seems to be for IIS only, and seems universal. I haven't used them.
https://www.microsoft.com/en-us/download/details.aspx?id=41177[^]
rsat tools - This I huse currently on Windows 8.1 and Server 2012. quite happy with them.
http://www.microsoft.com/en-us/download/details.aspx?id=28972[^]
|
|
|
|
 |
Hi! I need to build a notification tool which sends the email right at the moment when a service portal gets new incident. For this I need to pick up email content from service portal, which can be static data as 'label data' or can be input data as 'text entered' or 'option selected' etc. I'm willing to build this solution in .net C#. Please suggest me a convinient method through which I can get the email content. Many Thanks in advance!!
|
|
|
|