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.
This is my very first post here. so, please take easy on me.
I wrote a stored proc that takes 4 parameters and inserts into the db.
I have tested it using SSMS and it works great but I can't get it work with my .net app.
No errors but just doesn't work.
This is supposed to go live on Tuesday and I must give a demo by Monday.
The insert bit is the last task and is supposed to be easy.
Can someone please help?
Code is below and thanks a lot in advance.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
Dim questld As HiddenField = DataList1.FindControl("HiddenField2")
For Each item As DataListItem In DataList1.Items
If item.ItemType = ListItemType.Item Or item.ItemType = ListItemType.AlternatingItem Then
Dim positionid As Integer
Dim choiceid As Integer = 0
Dim choicetext As String = ""'positionid = CType(item.FindControl("Label3"), Label).Text
positionid = CType(item.FindControl("HiddenField2"), HiddenField).Value
Dim anstype As HiddenField = item.FindControl("HiddenField1")
Select Case anstype.Value
Dim rbl As RadioButtonList = item.FindControl("RadioButtonList1")
choiceid = rbl.SelectedValue
SaveVotes(positionid, choiceid, choicetext, "")
Dim cbl As CheckBoxList = item.FindControl("CheckBoxList1")
For i As Integer = 0 To cbl.Items.Count - 1
If cbl.Items(i).Selected Then
choiceid = cbl.Items(i).Value
SaveVotes(positionid, choiceid, "NA", "")
Dim txt As TextBox = item.FindControl("TextBox1")
choicetext = txt.Text
SaveVotes(positionid, 0, choicetext, "")
DataList1.Visible = False
Private Sub SaveVotes(ByVal qid As Integer, ByVal cid As Integer, ByVal ct As String, ByVal cuser As String)
Dim al As ArrayList = CType(Session("AnswerList"), ArrayList)
'Dim s As String
If al Is Nothing Then
Dim connStr As String = ConfigurationManager.ConnectionStrings("BallotsConnectionString").ConnectionString
Dim conn As New SqlConnection(connStr)
Dim cmd As New SqlCommand("InsertBallots", conn)
cmd.CommandType = CommandType.StoredProcedure
Dim p1 As New SqlParameter("@qid", qid)
Dim p2 As New SqlParameter("@cid", IIf(cid = 0, DBNull.Value, cid))
Dim p3 As New SqlParameter("@ct", IIf(ct = "", DBNull.Value, ct))
Dim p4 As New SqlParameter("@cuser", Session("UserName"))
I cached a page using the directive and attribute VarByParam.It worked fine and my problem is I am having a web page with a Panel control and inside the panel two text box were used and the ID for those text box are txtTest1 and txtTest2 with the text Test1 and Test2 respectively. All my need is to partially cache this particular panel along with their child controls and its value means the two textboxes and its text. Please give me the solutions.
Of course that cannot work. Where does that code run? On the server. And how can you hear on your client what's played on the server? Only when client and server are the same computer.
You have to embed the sound in your web page, e.g. a tag for background sound, or embedding it.
1.- Where does that code run? The code is published in an IIS which any device conected on the local net enters (computers, tablets running Android)
2.- How can you hear on your client what's played on the server? I want to play a sound in each device that enters to the page
Right now a have embed the sound that i need to play on any device, in my web page, what I need to know is the right code to be able to play the sound when someone enters to the page
Not really sure where to post this question but I hope someone here can help.
We have a classic asp site deployed in IIS7 under a domain, let's call it www.classicsite.com. We've developed a site in ASP.NET MVC and need to integrate it into the first site under the same domain so it'll be access as follows: www.classicsite.com/mvc.
Hi frnds, i am implementing contact manager, in it user can add groups and manage the groups by adding contacts init and vise verse, but when the user want to add or remove contacts from particular group how to update it in the database so that no duplicate values is inserted. what is the best process to do.
I am writing to seek help, in how do I go about writing pop-up message, when the user fails to login or is not logged in. This is what I have so far:
public HttpResponseMessage GetUser()
var mes = string.Format("admin user");
return Request.CreateErrorResponse(HttpStatusCode.NotFound, mes);
var mes = string.Format("trial customer");
return Request.CreateErrorResponse(HttpStatusCode.NotFound, mes);
// code for not logged on users.
Any guidance or help would be very much appreciated.
Many thanks in advance.
I see in some places when I try to debug a .js file that the url of the file is different from call to call.
How do I accomplish it?
If I have a .js file with a name, how can I change the url to it every call.