[Solved] how to open a message box [closed]

By message box I’m assuming you mean a javascript alert. I’m not a big fan of posting back with javascript functions. I think its messy, and that javascript should only be used when dealing with client-side actions. I would actually recommend to use a placeholder and a literal control for this. You could have the … Read more

[Solved] ASP.net Null Reference Exception Due to Not Finding Controls

In my experience, DIV’s are not registered to the server like ASP controls are so calling them directly would produce bad results. When making changes to the controls, i.e. adding styles, make sure you tell ASP what kind of control you have. For example: HtmlGenericControl _fail = (HtmlGenericControl)Page.FindControl(“fail”); _fail.Style.Item(“visibility”) = “hidden”; Edit: The problem lies … Read more

[Solved] How to transfer data from one page to another page in asp.net, I dont want to use sessions

You can use Query String & Cookies Example for Query String : Passing value.. private void Button1_Click(object sender, System.EventArgs e) { // Value sent using HttpResponse Response.Redirect(“Form1.aspx?Name=”+txtName.Text); } Getting value using Query String.. if (Request.QueryString[“Name”]!= null) // null checking lbl_Name.Text = Request.QueryString[“Name”]; 3 solved How to transfer data from one page to another page in … Read more

[Solved] How Get relative path [closed]

Use these methods to generate urls relative to pages that you execute them within: this.Page.ResolveUrl this.Page.ResolveClientUrl this.Page.ResolveUrl(“~/Uploads/Picture/Commodities/1390/11/TumbDesert.jpg”); this.Page.ResolveClientUrl(“~/Uploads/Picture/Commodities/1390/11/TumbDesert.jpg”); solved How Get relative path [closed]

[Solved] stored procedures instead of forms

You’re describing Web Forms, which is another part of ASP.NET, but not part of ASP.NET MVC. The calling of stored procedures has nothing to do with any of these technologies. Some people choose to put such calls in their Controller or Code-Behind rather than having it in a separate data layer. 2 solved stored procedures … Read more

[Solved] Building HTML from Javascript in Asp

You can’t using client side code to generate server side code. By the time the browser has generated the ASP, the server will have finished running the ASP and sent the result to the browser. The error report probably has to do with you attempting to use ASP tags inside a script element. 4 solved … Read more

[Solved] Error when execute query [closed]

The roll number string in your where clause needs to be delimited as a string. This line query = query + ” ” + “WHERE rollNo=” + “2K12-BSCS-37″; should be replaced with query += ” ” + “WHERE rollNo=” + “‘2K12-BSCS-37′”; Note the single quotes. Better still would be to use string format to build … Read more

[Solved] Regular expression for one Alphabet and many numbers

A regular expression to validate if a string starts with a single letter A-Z in any case and has 1 or more digits and nothing else is: ^[A-Za-z]\d+$ Explanation: ^ … beginning of string (or beginning of line in other context). [A-Za-z] … a character class definition for a single character (no multiplier appended) matching … Read more