I have started learning MVC and I have few questions in my mind,
1: As I seen that there is no .cs file in View, then how would I write my code behind for the page. I am very new to inline coding, do I need to learn it ??
2: What if I want to develop pages like I have already done for asp.net 2.0/3.5 websitepreviously.
Can we write property in property?IN the page load event we have page property and we can find another page property in that page property.Pls let me know how this is happening
The following jQuery code lets me hide and open a panel and set focus on a textbox depending on the setting of a RadioButtonList. There are few problems I have with it (discussed below code).
[Code]....
Problems:
(1) Focus doesn't set on txtSpouse when clicked value is 0. (2) When I put the function in a .js file, neither of the textboxes (txtSpouse and txtMaiden) receive focus. (3) I need to unhide pnlMaiden when the page is loaded and rblGender value is 1.
I have alot of code in the page load event as below.
Is it best practice to use (!NotPostBack) and wrap the code in this block or does it depend on the methods etc. I also have code which populates ajax slideshow as well which gets images from database.
I have an ASP.NET project using C#. I'm loading data (Username, email, etc...) from a sqlite database with C# (using ADO). I'll be loading the data into static Global variables in a class file in my App_Data folder. I need to be able to insert the username into an ASP.NET Label on a page during load.
Question 2 : I made javascript code for client side validation. function loginjs() { if(document.getElementById('txtUserName').value.length==0) alert("UserName cannot be blank"); else if(document.getElementById('txtPassword').value.length==0) alert("Password cannot be blank"); }
this code executes but it is not stopping further code execution. I mean it is only alerts but in addition to that i need to stop further execution.
I want to write a code that open a new page in for ex : ".aspx?id=1" . like this site : [URL] when my user click on his article then go to "aspx?id=76" what am i going to do ?
how can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?
check the following code, this is what I want to write put I don't know where or how !
I hv Declared two Master page one Is Base and Derived.. Base Page Load is working but when i hv written load controls in Derived Page Load Using C# it's not working..
There are files stored in sql server (datatype of column is varbinary in the database).
each record is in one record in that table (FILE_TABLE).
And there is another table (PATH_TABLE) to store the files paths.
for example,
when the user download the folder A (select an item on the tree and click a button on the client side),
there is one sub-folder B and two files A-1 and A-2.
in folder B, there is two files B-1 and B-2.
then, at the code behind (server), the server will get the files from the database and convert them (including the files and subfolders) to a .zip file (or other compressed files)
and then write a response (using the method HttpResponse.BinaryWrite(Byte[] xxx) )
to client side and let the user download.
after the download, the user can extract the compressed file and the structure of the folders and files keep unchanged.
I want to write a page where user's can write a blog post and publish it to the blog. I've downloaded blog engine .NET and looked at the code and I like the way they do it, but it's completely an overkill of what I need. What I need is only a title, author, date, and the blog post it self. I don't even want users to post comments or anything like that. My approach is to save all those blog post information into an xml and then when a page loads it loops around those xml files to show the blog post.
I have a code which I repeat over and over so I am thinking to write subroutine. Not sure if there are functions in C#. Could you advise how to pass arguments to it. An example of add two numbers would be great.
Using VB.net, C# and SQL ServerI want to write a pseudo for my application.pseudo code is like coding or flow chart...?Can any one provide a sample pseudo code for any type of application.