I need a help. what i exactly wanna do is that i want to make an android app for my college attendance and everything. (That's my final goal.)
But before that i want to make a webpage where i can do the same. Suppose a guy will enter his id and password and then i'll show the content in a table.
Above is the college's page where i do the same. but when i extract the html source of the page, i dont get table's data. but when i manuallly select the table and then view the page source,i can see that.
What i exactly wanna know is that how to that in dotnet? i mean how to get the source of the tabble.
You can't. submitting files to a website is voluntary, and the user has to choose which files to submit.
Websites that run in a browser on the client system run in a protective bubble, that is separated from the operating system. Sort of a sealed container.
You can resize the image after uploading by using system.drawing, measuring the size of the uploaded image, calculating the new height and width, and the new canvas size, and then creating a new blank canvas, and then overlay the original image over the canvas and save the new file.
Or you can write several programs in c++ to run on the client computer such as Linux, OSX, Windows, that will resize, and transmit the new bytestream to a webservice as a non-primitive, and then make the write to the disk drive.
I have deployed a web application in web farm scenario with a load balancer and multiple servers. If a request coming to one server it works but if to the other server it not works. What issues can it have??
As per your code, it does not seem issue here. I'll advise you first run your Proc and see whether it is running and resturning data correclty.
Then you debug your code and check the datatable in immidiate window and see it in visualiser what columns are available in datatable.
I aked my question a few days ago on stack overflow but I'am not lucky with the one answer. Perhaps, someone can help me here.
My first controller method is:
[HttpGet]public ActionResult Item()
In this method, I have some business logic like retrieve the user id with sql or watch out if a user has the permission to see some regions on the view or whatever.
I used bool variables in my viewbag and get these data with razor.
It's only one case..
Now, the user is going to fill data in a form, will make a post and then I call the same method, but with a [HttpPost()] flag (I saw it in many tutorials).
Ok, now I can collect the values out of the form and can work with them.
BUT if this function is ready, it gives as standard View() back and I can't made the business logic like in the Get() method or must I really copy/pase all these stuff or get it in a own function and call it two times?
Here is a link to my stack overflow question, perhaps you unterstand me better with that:
It seems that what you described as "some business logic" is some common processing that you want to fire in both GET and POST methods. In that case you can refactor it as separate method.
If that logic is valid only inside that one controller you can make private method that is called by both Item() methods - private controller methods are not mapped to MVC actions.
If it is more application wide you can also consider refactoring it out to some helper class.
BTW - copy/paste should be banned in any development environment
"My software never has bugs. It just develops random features."
It was because the static content module wasn't installed.
Now, the question is; why isn't this feature checked by default when installing IIS7?
I mean what is the use of a web server that doesn't support static content requests?
I think you have to assign the value in init in code behind, before page load.
If I remember correct, the webform elements load first, and then page.load fires in the page life cycle
My mistake about the master page holding its own view state which is not shared. But I am correct about loaing the viewstate in page.init to hold its value during partial page post backs, and not page load
Hi, I am trying to insert some date to my SQL-Server using ASP.Net. But I am getting the error message like, " ExecuteNonQuery: Connection property has not been initialized." I am using store procedure to store the date. My code is
when you are binding the valuesfromanysource, create another alias in your selection query.
ex: select fullname,left(fullname,20) as shortname from tablename
the 20 mentioned can be of your need.andthen bind the shortname to literal.it works.
<ItemTemplate><asp:CheckBoxID="chkItemSelect"runat="server"/><asp:LabelID="lblname"Text='<%#Bind("name")%>'runat="server"/><asp:ButtonID="btnFindx"runat="server"CommandName="Findx"Text="Do Some thing"CommandArgument='<%#Eval("ID")%>'></asp:Button></ItemTemplate>
So, in event OnRowCommand(Code Behind) :
Protected Sub GridView_RowCommand(sender As [Object], e As GridViewCommandEventArgs)
Select Case e.CommandName
..in MethodFindControlValue() :
Private Sub MethodFindControlValue()
For Each row As GridViewRow In ApprovalGrid.Rows
Dim chkItemSelect As CheckBox = CType(row.FindControl("chkItemSelect"), CheckBox)
Dim chkItemSelect As Label = CType(row.FindControl("lblname"), CheckBox)
Dim id As String = Convert.ToString(NameGridView.DataKeys(row.RowIndex).Value.ToString())
and the last,in code behind pageListForExportExcel.aspx.cs
use this :
protectedvoid Page_Load(object sender, EventArgs e)
Response.Clear();// this for clear any response
Response.Buffer = true; // and then set to Buffer is true
Response.ContentType = "application/vnd.ms-excel";// and this is for call type what you want to set File extention for save....you can export to pdf ,if you change value Response.ContentTypevar process = new DataLayersCollections();//set here by name your BusinesLogicvar list = process.GetListFromDataTable(); //set here by name your functions
rep1.DataSource = list;
and the latter again .......
good luck ....
hope this help you.....