I have following abc.aspx file:
<%@ Page Language="vb" AutoEventWireup="false" Codefile="abc.aspx.vb" Inherits="abc" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<asp:textbox id="txtSearch" runat="server"></asp:textbox>
</body>
</html>
here is abc.aspx.vb file:
Partial Class abc
txtSearch.Text = "HELLO"
When i try to use this it gives error: txtSearch is not accesible?
Can anyone please tell me what am i doing wrong here?
This is not complete code just a snippet. But i think it gives an idea what am i trying to do.
If you’re trying to set that value at the class level, that’s not allowed. The functionality you’d be trying to achieve with that can be accomplished by setting it in the constructor: