Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all 3509 articles
Browse latest View live

Failed to publish in Visual Studio 2010 -- no error message explaining why...

$
0
0

I am trying to learn how to set up a web service using Net 3.5, on a machine that I am part of the administrator's group.  I  get to the point in the tutorial (found by searching the net) to right click on my appliction and "publish".  When I "ok" the form, at the bottom left of the screen under the Error List tab, "Ready" gets replaced by "Publish failed" and no explaination is given.

Any thoughts on this?  I am just looking to create my first "simple" web service.  If someone can give me a hyperlink to one that goes through the entire process ala "Web Services for Dummies", I would appreciate that as well.

Bob


Problem With Saving Updated Project Files

$
0
0

I am constantly updating files in my VS project. When clicking the save or save all icon to save an updated file, there are times when the file will not save. Sometimes I have to click the icon 10 times or more. Have I got a setting wrong or is this a bug? I am using VS 2012 Pro. It is getting so aggravating!

Thanks!

Jeff

Debug Threads

$
0
0

Hi,

I have an application where there are multiple tasks distributed across different thread.

The threads are started on click of a button click using Start() method of Thread class.

One of the methods in the class is assigned to a thread. 

When I do the button click that time I am able to debug the method, but then after even if I keep a breakpoint in the method, the command is not getting to the breakpoint. 

Please help me how to do debugging in multi threaded application.

Javascript code analyzer fails to process ASP.NET special tags.

$
0
0

I have the following code in my .aspx file:

<script type="text/javascript">
...
var js_variable = <%= _PublicFieldFromCodeBehindClass %>;
...
</script>

This code compiles and executes just fine. But I always have a "Syntax error" in my error list after building the project. And the semicolon at the end of the string is underlined red:

Apparently, it's a JS analyzer bug. How to workaround it?

Script Virus/error--please help

$
0
0

Hi Guys,

There is some serious problem in my Visual Studio 2010,

When I am running my project, some unknown scripts comeup at the top of my project name in  the solution explorer,

I guess it is because of some script, the script is composed of various sub files namely, eval code, anonymous code, etc, and I am unable to detect them on my machine,

Kindly do help me on this asap as my files are getting corrupted,

Thanks and regards,


UPDATE NOT CORRECT IN GRIDVIEW

$
0
0

when click update ,the date change textbox suchas :

I change  data in firstname column  when click update save data in phone column and click update svae in last name column

why do this ?

I sahre my code here :

--- class person property

Imports

system.data

Imports

System.data.sqlclient

Imports

Microsoft.win32

Public

Class Personpro

Private _ID As Integer

Private _phone As String

Private _FNAME As String

Private _LNAME As String

Private con As New SqlConnection

Public Sub getconnectioN()

Try

con =

New SqlConnection(DBCONNECTION.CONSTR)

con.Open()

Catch ex As Exception

MsgBox(

"CANN'T OPEN DATABASE")

Finally

con.Close()

End Try

End Sub

Public Sub New()

getconnectioN()

Dim cmd As New SqlCommand

Dim dr As SqlDataReader

Dim sql As String = " select Pers_PersonId ,Pers_FirstName , Pers_LastName,Pers_PhoneNumber from Person where 1 =1 "

With cmd

.CommandType = CommandType.Text

.CommandText = sql

.Connection = con

End With

con.Open()

dr = cmd.ExecuteReader

While dr.Read

_ID = Convert.ToString(dr(

"Pers_PersonId"))

_FNAME = Convert.ToString(dr(

"Pers_FirstName"))

_LNAME = Convert.ToString(dr(

"Pers_LastName"))

_phone = Convert.ToString(dr(

"Pers_PhoneNumber"))

End

While

End Sub

Public ReadOnly Property id() As Integer

Get

id = _ID

End Get

End Property

Public ReadOnly Property phone() As String

Get

phone = _phone

End Get

End Property

Public ReadOnly Property FNAME() As String

Get

FNAME = _FNAME

End Get

End Property

Public ReadOnly Property LNAME() As String

Get

LNAME = _LNAME

End Get

End Property

End Class

--- class methods update and delete

Imports

System.Data

Imports

System.Data.SqlClient

Imports

Microsoft.win32

Public

Class Person

Private con As New SqlConnection

Public Sub getconnectioN()

Try

con =

New SqlConnection(DBCONNECTION.CONSTR)

con.Open()

Catch ex As Exception

MsgBox(

"CANN'T OPEN DATABASE")

Finally

con.Close()

End Try

End Sub

Public Sub Updt(ByVal ID As Integer, ByVal phone As String, ByVal FNAME As String, ByVal LNAME As String)

getconnectioN()

Dim cmd As New SqlCommand

Dim da As New SqlDataAdapter

Dim sql As String = " update Person set Pers_PersonId = '" & ID & "', Pers_FirstName = '" & FNAME & "', Pers_LastName = '" & LNAME & "'," & _

"Pers_PhoneNumber = '" & phone & "'" & _

"Where Pers_PersonId = " & ID

Withcmd

.CommandType = CommandType.Text

.CommandText = sql

.Connection = con

End With

da.SelectCommand = cmd

con.Open()

cmd.ExecuteNonQuery()

con.Close()

End Sub

Public Sub delete(ByVal ID As Integer)

getconnectioN()

Dim cmd As New SqlCommand

Dim da As New SqlDataAdapter

Dim sql As String = " Delete from Person " & _

" where Pers_PersonId = " & ID

With cmd

.CommandType = CommandType.Text

.CommandText = sql

.Connection = con

 

End With

da.SelectCommand = cmd

con.Open()

cmd.ExecuteNonQuery()

con.Close()

End Sub

Public Function find() As DataSet

getconnectioN()

Dim cmd As New SqlCommand

Dim sql As String = " Select Pers_PersonId , Pers_FirstName , Pers_LastName , Pers_PhoneNumber from Person where 1 = 1 "

Dim dt As New DataSet

Dim da As New SqlDataAdapter

With cmd

.CommandType = CommandType.Text

.CommandText = sql

.Connection = con

End With

da.SelectCommand = cmd

da.Fill(dt)

Return dt

End Function

End Class

----  class events  form

 

Imports

System.Data.SqlClient

Imports

System.data

Imports

Microsoft.Win32

Partial

Class PersonCRM

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try

If Not Page.IsPostBack Then

Dim x As New Person

Dim dT As DataSet = x.find()

GVperson.DataSource = dT

GVperson.DataBind()

End If

Catch ex As Exception

MsgBox(ex.Message &

" ERROR Page_Load ")

End

Try

End Sub

Protected Sub GVperson_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GVperson.PageIndexChanging

GVperson.PageIndex = e.NewPageIndex

GVperson.DataBind()

Dim x As New Person

Dim DT AsDataSet = x.find()

GVperson.DataSource() = DT

GVperson.DataBind()

End Sub

Protected Sub GVperson_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVperson.RowDataBound

Try

If e.Row.RowType = DataControlRowType.DataRow Then

Dim txtID As TextBox = CType(e.Row.FindControl("txtID"), TextBox)

Dim txtfname As TextBox = CType(e.Row.FindControl("txtfname"), TextBox)

Dim txtlname As TextBox = CType(e.Row.FindControl("txtlname"), TextBox)

Dim txtphone As TextBox = CType(e.Row.FindControl("txtphone"), TextBox)

Dim x As New Personpro

If x.id.ToString() = Nothing Then

txtID.Text = 0

End If

If x.FNAME.Trim() = Nothing Then

txtfname.Text = 0

End If

If x.LNAME.Trim() = Nothing Then

txtlname.Text = 0

End If

If x.phone.Trim() = Nothing Then

txtphone.Text = 0

End If

End If

Catch ex As Exception

MsgBox(ex.Message &

" ERROR RowDataBound")

End

Try

End Sub

Protected Sub GVPERSON_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GVperson.RowUpdating

Try

Dim row As GridViewRow = DirectCast(GVperson.Rows(e.RowIndex), GridViewRow)

Dim ID As Integer

Dim FNAME As String

Dim LNAME As String

Dim phone As String

Dim txt As TextBox

txt =

CType(row.FindControl("txtId"), TextBox)

ID = txt.Text.Trim()

txt =

CType(row.FindControl("txtfname"), TextBox)

FNAME = txt.Text.Trim()

txt =

CType(row.FindControl("txtlname"), TextBox)

LNAME = txt.Text.Trim()

txt =

CType(row.FindControl("txtphone"), TextBox)

phone = txt.Text.Trim()

Dim objper As New Person

objper.Updt(ID, FNAME, LNAME, phone)

Dim Dt As DataSet = objper.find()

GVperson.DataSource = Dt

GVperson.DataBind()

Catch ex As Exception

MsgBox(ex.Message &

" CAN NOT update DATA")

End Try

End Sub

Protected Sub GVPERSON_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVperson.RowDeleting

Try

Dim row As GridViewRow = DirectCast(GVperson.Rows(e.RowIndex), GridViewRow)

Dim ID As Integer

Dim phone As String

Dim FNAME As String

Dim LNAME As String

Dim txt As TextBox

txt =

CType(row.FindControl("txtid"), TextBox)

ID = txt.Text.Trim()

txt =

CType(row.FindControl("txtfname"), TextBox)

FNAME = txt.Text.Trim()

txt =

CType(row.FindControl("txtlname"), TextBox)

LNAME = txt.Text.Trim()

txt =

CType(row.FindControl("txtphone"), TextBox)

phone = txt.Text.Trim()

Dim objper As New Person

objper.delete(ID)

Dim Dt AsDataSet = objper.find()

GVperson.DataSource = Dt

GVperson.DataBind()

Catch ex As Exception

MsgBox(ex.Message &

" CAN NOT delete DATA ")

End Try

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim x As New Person

Dim dt As DataSet = x.find()

GVperson.DataSource = dt

GVperson.DataBind()

End Sub

End Class

pass session to masterpage

$
0
0

i have one master page, insite this master page i create a logon page

so when the user successfull login it will redirect to the selected web page, and the  username will appear on top of the master page

mycode is below: so how to pass the session value to masterpage...need help from expertise here

lblnama.text=session("username")

Website loses formatting in IIS Express

$
0
0

I have a website which looks fine in Blend for Visual Studio 2012 Development Server, but when I run it in VS2012/IIS Express it loses formatting and images. It also looks fine when published.


"Anonymous Code" error

$
0
0

Hi,

when I run my app from within VS2008 and type something in a text and tab out, I opens the "anonymous code [debigging]" file and a javascript erro dialog with "Microsoft JScript runtime error: 'a' is undefined" and the content of the file is:

function anonymous() {

ValidatorOnChange(event); a.handleOnChange()

}

 

I have a requiredFieldvalidator for the textbox in question. I couldn't find anything related to this issue when I googled for it.

There is on onchange event for the textbox.

Thanks.

Can we fix the parameter values ?

$
0
0

Say for example, we have a function

public string AssignValueOnAvail(string Property in ( "A", "B" ))

{

return "";

}

In this can we fix the input paramter value as in ( "A", "B" ) ?. So that other than these values can't be entered.

As we have check constraint in DB.

Please suggest.

visual studio debug issue

$
0
0

hi all,

im using .net 4.0 with VS 2010 premium edition.

while debugging i can edit the code but, i'm getting exception like below

how to resolve this?

Rebuild All: 0 succeeded, 1 failed, 0 skipped but no item in error list.

$
0
0

hi,

I am facing a problem with Visual Studio 2010 as of late that I can't figure out. ...Rebuild All0 succeeded1 failed0 skipped

but no item in error list. Please suggest


Possible to make hyper-V (WP8 Emulator) see my ASP.NET development server?

$
0
0

I have a ASP.NET MVC 4 Web API that I use for a game I am developing, so I want to debug both my web api and my game at the same time (So I can see what data I recieve and what data I send etc) but as the emulator runs in hyper-v it cant access my localhost server, is it possible to configure so it can access it?

Reg Website Development

$
0
0

Hi,

I am mahesh, using Visual Studio 2008 and SQL Server 2005. Please anyone in the forum please provide the links (Free) for tutorials for Website Development from Beginning to End. I am a Beginner and looking forward to become a Software Developer. Someone in the forum have informed to follow Sitepoint Tutorial, but i can able to download only 4 chapters and anyone can please provide the other tutorials of the SitePoint.

Mail Id  : vsrmagesh@hotmail.com

visual studio 2008 rdl reports: keep on same page does not work with a group containing a tablix row and a subreport

$
0
0

Hi,


I have a report that contains a tablix. In this tablix there are 3 rows besides the header as follows:

  • The first row contains a couple of parameters
  • The second row contains a subreport
  • The third row is a totals row that does not repeat but appears once at the end of the report

I have the first and second rows grouped together with the "Keep together on one page if possible" option set for the tablix. However, i have cases where the first row appears on one page and the second row (subreport) appears on the next page even though both rows combined are still much smaller than a single page and can appear on a single page easily. What is the problem? Am I missing a property? Any help much appreciated.


Thanks,
George


Format the whole document is not working in 2012

$
0
0

The "Format the whole document" feature is not working in Visual Studio 2012 Ultimate.  Can anyone tell me how to fix that?

Thank you in advance.

David

Method not found: 'Void System.Web.Compilation.BuildManager.AddCompilationDependency(System.String)'.

$
0
0

hi 

how can i solve this problem??

Can an application (a part of a website) be published using Web Deploy

$
0
0

Suppose website www.mydomain.com has an application myapp (i.e. www.mydomain.com/myapp), can myapp be published using Web Deploy?

I cannot figure out how to configure the publish profile for this, or it is impossible.  I have tried the following:

Publish method: Web Deploy

service URL: www.mydomain.com

Site/application /myapp

and got the following error:

Error 1 Web deployment task failed. (Site 'myapp' does not exist.) 

Any tip will be greatly appreciated.

 

Hang System VS 2005 VB.NET

$
0
0

WHEN I Run my system it's Hang ,no show gridview(data) ,no complete run

please help me

VS2012 ISSUE

$
0
0

I am having trouble getting my tools>options>html>formatting to apply. Anyone else having the same issue or know how to work it? 

I have set them up, added tags, but it won't get them to apply to the text in the editor.

Viewing all 3509 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>