I need to generate a public string in C# that returns the machineGUID of the computer. This will be used to generate records showing who was the user and the computer who updated records.
So I have this object I'm creating, just to hold some string and boolean data that I want to pass to the second page. So I have a class file:
[Code]....
[Code]....
And I'm setting values from form controls, like this:
[Code]....
So here is the really weird part: if I try to set a label's text property equal to objPrimaryScreeningData.myMemberVariable after selecting it - there is nothing there. I'm sure it's a stupid mistake - being self taught stinks.
Public Sub gridedit_DeleteCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Dim con As New SqlConnection(GetConnectionString()) Dim U_ID As String = gridedit.DataKeys(e.Item.ItemIndex).Value.ToString cmd.CommandText = " Delete from AtdWeekend where WeekendID=" & U_ID cmd.Connection = con
[Code] ...
Data save in table in WeekendID as char format so here it gives error how can I resolve it...
This is driving me nuts. I'm trying to make a better search function for my database. I've had this working before but for the life of me I can't see where the problem is.
The error is: Public member 'Text' on type 'String' not found.
I have the following JS public string SavePafForm(string name, string age, string phonenumber, string ismale)
[code]...
It's my goal to pass in up to 20 parameters to this method...I'd like to pass it in as one object I can deal with, rather than 20 parameters in the method signature.
i followed this link [URL] and i get selected value from dropdownlist using jquery
i created 3 partial views .
i need depend's on dropdownvalue redirect to partial page , so how can i implement in jquery with conditions?? or how can i implement in this function Public Function FetchData(ByVal dropdownValue As String) As ActionResult??
I have a question about C Sharp ASP.NET:Is there a difference (in code speed, resources) between:public static variable declared in public static class MyGlobals in a 'Code File' template;and the variable declared in a normal 'Class File' template;I use this variable in 2 different Class Files and also in _Default Page codebehind cs file.In fact in my case I need about 20 global variables of type List<string>.
I am building an app and am newish to programming. I am having issues with the ICallBack. Basically on my .aspx page i will have lots of gridviews in repeaters,and i need some javascript to cycle through those and change the colours accordingly after it has done a function.This code worked fine on my laptop,but when i uploaded it to our server it stopped, apparnetly MS have changed something from early .net 2 to .net4.To get my code not to throw an error i have made a new public void
public void RaiseCallbackEvent(String eventArgument){}
and put my code in here, the problem is that in this public void, i connect to the DB grab data into a datatable and then fill various gridviews, however i cant get it to fire as its not in the onpageload part of my code.I read that if i was to add System.Web.UI.Page, Page, ICallbackEventHandler- this to my code it would work, but it doesnt, it just throws an error.
I'm designing a page in visual designer of ASP.NET. I need another class to have direct access to controls of this page because this new class gets it's inputs from controls of the page.
I were wondering if there is a way to make the controls public member so that new calss can access them. Plus, is there any security concern related to this approach?
I have a publice variable to be used in the same webpage. when the user click on button 1, it does some process and assign a value to my public variable. After that, the user can click on button 2 which needs the public variable value to function. However I see the value of the public variable is 0 when I click on button 2.
I have a dll file that used in two separate projects, that contains a class for enumerations. In one of the projects I get empty string instead of the enum value from the below statement
After a day of seraching and not finding an answer, I decided to join and post my issue. I'm not sure why I am receiving the subject error considering just yesterday, it was working fine. If more code is needed to provide input on my problem, please let me know and I will get right on it."Dim v As New Vehicle(0)" is the cause of the error. Since this error occurs, a bunch of other errors will pop up not recognizing any of the properties or methods I've created in my Vehilce class. So I am guessing this is the root of the issue.
When I try to use Routes in new ASp.Net WebaPplication using .Net framowork 3.5
Line 7: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) Line 8: ' Code that runs on application startup Line 9: RegisterRoutes(RouteTable.Routes)
I encounter Error: Warning: BC40056: Namespace or type specified in the Imports 'System.Web.Routing' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Source Error: C:UsersTomAppDataLocalTempTemporary ASP.NET Fileswebsite2fec408f890149acApp_global.asax.2w_ytzx2.0.vb(26) : warning BC40056: Namespace or type specified in the Imports 'System.Web.Routing' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. Imports System.Web.Routing. I installed VS 2008 + sp1 on windows 7. and I am using Asp.net Developement server to Run Web Application.
I have a problem to pass along public variables from C# code to the HTML code. I assign the variables in the Page_Load event and then pass along them to the Panel and Image control in the HTML code. Though I get this compileerror for the Width: "Cannot create an object of type "System.Web.UI.EbControls.Unit" from its string representation '<%setWidthImage%>' for the 'Width' property."
Each of my ASP.NET pages currently has VB.NET code to change the text and display properties of a Label control, to display a message if an error occurs when any of the functions or routines fail. However, ideally it would be useful to have a generic error message popup displayed, with the option of inputting text via an argument.
If the site were in VB6, I'd be using the MsgBox function, since you can adjust the text displayed and change the type of message displayed (i.e. vbExclamation). The MsgBox can be called with minimal coding. But web pages will not support Windows.Forms
So another method here might be to use the ModalPopupExtender to display an error message using a Panel control if an error occurs, and to adjust the message content and icon depending on the type of error. But the problem here is that a Panel will need to be defined in each and every aspx page.
Ideally I want a public function (with an input argument or two) that will display a single Panel via a ModalPopupExtender, that can be called from any of my pages. The text and icons could be altered by the arguement values supplied.
I have a detailsview with template fields. when i go into edit mode i am trying to set the selectedvalue of a dropdownlist to be the value of the corresponding label from the item template in code behind as once i go into edit mode i loose the initial value from the detailsview and the dropdownlist defaults to the first listitem. what i am doing is onDataBinding of the detailsview i access the cell value of the label , i then assign that to a public variable but once i've exited the routine the public variable looses the value of the detailsview cell i've just assigned to it. this is the value i'm hoping to assign to the selectedvalue of the dropdownlist when i go into editmode. The reason i'm doing it this way is although i can use bind in the html to mantain the dropdownlist selected value between detailsview states once i come to update the detailview i get the following error
Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.to work arround this i've had to assign the values to update paramteres also in code behind. here's my code behind page i've bolded the routines in question. drpDataStoreDDL is the variable in question.