ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2017 All rights reserved.Where to declare Session variable in ASP.Net? Global.ASAX?<p>&nbsp;</p> <pre class="brush: html">Hi Sir, I heard that Global.asax file is optional in web application. But, if we need to declare any session variables in my website, do i really need to add Global.asax file and initialize session variables inside Session_Start() ? Please suggest. Kiran</pre> <p>&nbsp;</p>, 02 Nov 2015 07:12:07 GMTWhat is ViewState its Features Usage and Description in ASP.Net<p><strong>Hi</strong></p> <p><strong>I used these code in my page</strong></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp"> string data = Server.UrlDecode(Request.QueryString[&#34;BehCode&#34;]); _cn.Open(); _cmd.Parameters.AddWithValue(&#34;@image&#34;, filename); _cmd.Parameters.AddWithValue(&#34;@Behcode&#34;, data); _cmd.Parameters.AddWithValue(&#34;@id&#34;, Convert.ToInt32(ViewState[&#34;Id&#34;])); int ID = Convert.ToInt32(_cmd.ExecuteScalar()); if (ID &gt; 0) { ViewState[&#34;Id&#34;] = ID.ToString(); } _cn.Close(); </pre> <p><strong>I don't any thing about ViewState&nbsp; what dose this code do?</strong></p> <p><strong>can you explain about it </strong></p> <p><strong>Best Regards</strong></p> <p>&nbsp;</p>, 05 Dec 2012 01:22:24 GMTWhat is this error<p>An unhandled exception of type 'System.StackOverflowException' occurred in DataAccessLayer.DLL</p>, 11 Jan 2012 00:13:11 GMTWhat is the Default Session TimeOut in ASP.Net and from where I can change it<p>hi,</p> <p>&nbsp;&nbsp; what is default session time out in, please let me know were i can able to put the code in the application.</p> <p>&nbsp;</p> <p>thanks in advance.</p>, 12 Dec 2012 05:03:22 GMTWhat is Service Contract and Operational Contract Attributes in WCF Service<p>Hi</p> <p>Can any one give me an idea about service contract and operational contract in details</p> <p>Whether Service contract can be applied to class or only to the interface.</p> <p>What are the advantage of the service contract and operational contract in addition.</p> <p>thanks</p>, 07 May 2013 04:39:08 GMTWhat is of this.Page.Controls.Add method in ASP.Net<pre class="brush: sql">sir what is the use of </pre> <pre class="brush: sql"> this.Page.Controls.Add(SqlDataSource1);</pre> <pre class="brush: sql">in the following code.</pre> <pre class="brush: sql">&nbsp;</pre> <pre class="brush: sql"> protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { SqlDataSource SqlDataSource1 = new SqlDataSource(); this.Page.Controls.Add(SqlDataSource1); SqlDataSource1.ConnectionString = ConfigurationManager.ConnectionStrings[&#34;ConnectionString&#34;].ConnectionString; SqlDataSource1.SelectCommand = &#34;SELECT * FROM users WHERE ElectionId =&#39;&#34; + this.TextBox1.Text.Trim() + &#34;&#39;&#34;; this.GridView1.DataSource = SqlDataSource1; this.GridView1.DataBind(); this.GridView1.Visible = true; }</pre> <p>&nbsp;</p>, 08 May 2013 01:48:22 GMTWhat is DataBinder.Eval in ASP.Net<p>i have a doubt in this line..</p> <p>can u tell me what this line will do the operation</p> <pre class="brush: vb">&lt;%#&#34;default.aspx?UserId=&#34;+DataBinder.Eval(Container.DataItem,&#34;UserId&#34;) %&gt;&#39;&gt; &lt;%#Eval(&#34;UserName&#34;) %&gt;</pre> <p><br /><br /></p>, 31 Oct 2012 03:22:13 GMTUnderstand the usage of AJAX jQuery SilverLight and MVC<p>sir i not able to understand the usage of ajax, j query ,silverlight and mvc.</p> <p>i studied lot but not having clear idea. i am begineer.</p> <p>pls give simple definitions for each.</p> <p>for what purpose we using each one.</p> <p>and also mvc is wat?</p> <p>&nbsp;</p>, 24 Jan 2013 03:59:12 GMTThe ConnectionString property has not been initialized error<p>Hi folks,</p> <p>I am getting above mentioned error when I try to run the following code: </p> <pre class="brush: vb"> Private strConnString As String = ConfigurationManager.ConnectionStrings(&#34;conString&#34;).ConnectionString Private con As New SqlConnection(strConnString) Private pID As Integer <br />&#39;FIRST SECTION Dim query As String = &#34;query&#34; Dim cmd As New SqlCommand(query) cmd.Parameters.Add(&#34;@pID&#34;, SqlDbType.Int).Value =pID Using con Using sda As New SqlDataAdapter() Try cmd.Connection = con Catch ex As Exception Response.Write(&#34;Error&#34; &amp; ex.Message) Finally con.Close() End Try sda.SelectCommand = cmd Using ds As New DataSet() sda.Fill(ds) &#39;output End Using End Using End Using<br /><br />&#39;SECOND SECTION Dim cmd2 As New SqlCommand(&#34;query&#34;, con) Try con.Open() cmd2.ExecuteNonQuery() Dim reader As SqlDataReader = cmd2.ExecuteReader() While reader.Read() Dim rr As String = reader.Item(&#34;dID&#34;).ToString Dim returnedRows As String = reader.FieldCount.ToString() If rr = &#34;True&#34; Then &#39;output ElseIf rr = &#34;False&#34; Then &#39;output End If End While reader.Close() Catch ex As Exception Response.Write(&#34;error&#34; &amp; ex.Message) &#39;Error is beign displayed here: The ConnectionString property has not been initialized Finally con.Close() End Try </pre> <p>The error is coming from the second SQL cmd but if I comment out the first section; the second section runs fine.</p> <p>I must have made another basic error but I just can't figure out what it is. Any help would be great. Thanks.</p>, 01 Aug 2012 09:54:53 GMTText box validation<p>Which Regex do I use so the user can't enter in all caps in the textbox?</p> <p><strong>I want...</strong></p> <p><strong>Now is the time</strong></p> <p>Don't want this...</p> <p>NOW IS THE TIME</p> <p>&nbsp;</p> <p>&nbsp;</p>, 14 Feb 2012 05:16:35 GMTSaving a file into special folder when File is downloaded on users machine in ASP.Net<p>I need to save a file into special folder.</p> <pre class="brush: csharp">if (TextBox1.Text == s) </pre> <pre class="brush: csharp">{ MessageBoxResult mbr = MessageBox.Show(this, &#34;Do you want to save file?&#34;, &#34;saved&#34;, MessageBoxButton.YesNoCancel); // if (mbr == MessageBoxResult.Yes) // { // //string path = string.Empty; // string path; // path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + &#34;\\abc\\File&#34;; // if (!Directory.Exists(path)) // Directory.CreateDirectory(path); // }</pre> <pre class="brush: csharp">It creates a folder abc if it doen&#39;t exist, i need to save s where s is a textfile.</pre> <p>&nbsp;</p>, 02 Jul 2012 06:05:48 GMTSave downloaded file to specific folder on users machine in ASP.Net<p>how to save a text into a specific folder of computer(in document)&nbsp;by default,&nbsp;when the user clicks yes(for,Do you want to save the file?)&nbsp;to save a file into his computer? If the folder doesnot exist create and save the textfile?</p>, 26 Jun 2012 23:55:39 GMTSystem.NullReferenceException Error when finding control in Row Updating event of ASP.Net GridView<p>i got an error here in below line of code&nbsp; :</p> <p><em>Dim tempID As String = DirectCast(grdMaster.Rows(e.RowIndex).FindControl("tempID"), Label).Text</em></p> <p>ERROR IS : <span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;">System.NullReferenceException: Object reference not set to an instance of an object.</span></p> <p>&nbsp;</p> <p>&nbsp;</p> <p>my code is :</p> <p>&nbsp;</p> <p>Protected Sub grdMaster_rowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles grdMaster.RowUpdating<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim conStr As String = ConfigurationManager.ConnectionStrings("conStr").ConnectionString<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim con1 As SqlConnection = New SqlConnection(conStr)<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim tempID As String = DirectCast(grdMaster.Rows(e.RowIndex).FindControl("tempID"), Label).Text<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim grpName As String = DirectCast(grdMaster.Rows(e.RowIndex).FindControl("group"), TextBox).Text<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim usrName As String = DirectCast(grdMaster.Rows(e.RowIndex).FindControl("user"), TextBox).Text<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim str As String = "update MMM_REF_GROUP_USER set grpId=@groupId, usrId=@userId where tempID=@tempId "<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim cmd As SqlCommand = New SqlCommand(str, con1)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Parameters.Add("@tempId", SqlDbType.Int).Value = tempID<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Parameters.Add("@grpId", SqlDbType.NVarChar).Value = grpName<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd.Parameters.Add("@usrId", SqlDbType.NVarChar).Value = usrName<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grdMaster.EditIndex = -1<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grdMaster.DataSource = GetDataItem(cmd)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; grdMaster.DataBind()<br /><br /><br />&nbsp;&nbsp;&nbsp; End Sub</p>, 06 Jul 2012 09:23:58 GMTStore date which 4 days later than current date and then store in database in ASP.Net<p>if i select the today date</p> <p>then i want store 4days later date in the database</p>, 19 Jun 2012 05:34:54 GMTstack overflow<p>hii.. m getting this error..</p> <p>An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll</p> <pre class="brush: vb">Sub randgen() Randomize() rndum = &#34;&#34; Dim i As Integer = 0 For i = 1 To 8 x = Int(Rnd() * 10) rndum = rndum &amp; x Next nameAbbrevation() If nameFlag = 1 Then If ddlLoanScheme.SelectedValue = &#34;Marraige Loan&#34; Then ackid = &#34;MarLn_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Medical Facility&#34; Then ackid = &#34;MediFac_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Business Loan&#34; Then ackid = &#34;BusiLn_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Education Loan&#34; Then ackid = &#34;EduLn_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Home Loan&#34; Then ackid = &#34;HomeLn_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Auto Loan&#34; Then ackid = &#34;AutoLn_&#34; &amp; newword &amp; rndum ElseIf ddlLoanScheme.SelectedValue = &#34;Personal Loan&#34; Then ackid = &#34;PerLn_&#34; &amp; newword &amp; rndum End If Dim cnt1 As Integer = 0 con.Open() cmd = New SqlCommand(&#34;Proc_AddAppDetails&#34;, con) cmd.CommandType = Data.CommandType.StoredProcedure cmd.Parameters.Add(New SqlParameter(&#34;@Mode&#34;, Data.SqlDbType.VarChar, 50)) cmd.Parameters.AddWithValue(&#34;@strAppNo&#34;, Replace(Replace(ackid, &#34;&#39;&#34;, &#34;&#39;&#39;&#34;), &#34;&lt;&#34;, &#34;&#34;)) cmd.Parameters(&#34;@Mode&#34;).Value = &#34;chkDupAckwid&#34; cnt1 = cmd.ExecuteScalar() con.Close() If cnt1 = 0 Then ackid = ackid ElseIf cnt1 &gt; 0 Then ackid = &#34;&#34; End If End If If ackid = &#34;&#34; Then randgen() End If End Sub</pre> <p>&nbsp;</p> <p>&nbsp;</p> <p>m getting error at con.Open()</p> <p>pls help</p>, 19 Dec 2011 01:43:04 GMTSignificance of Layers of Three Tier Architecture<p>Can any one explain about 3 tier architecture and n tier architecture.</p> <p>I dont need explanation about the layer but i need what is the flow in 3 tier and n tier architectuere and what each layer contains and what is the responsibilities of each layer.</p> <p>&nbsp;</p> <p>&nbsp;</p>, 26 Jul 2012 07:08:23 GMTSignificance of 5 tier architecture and n tier architecture<p>Hi</p> <p>Can any one explain about 5 tier architecture flow and n tier architecture flow. I need the significance of each layer in both the architecture.</p> <p>&nbsp;Thanks.</p> <p>&nbsp;</p>, 27 Jul 2012 06:30:25 GMTShow image without saving<p>Hi,</p> <p>In URL belowyou explain how to show an image without saving it.</p> <p></p> <p>I've used this but im experiencing troubles IE 6 &amp; 7 dont show the pic. And IE 8 seems to have a limit of somekind. It there a way to get round this problem ?</p> <p>I have an person screen and a different upload popup-like-screen</p> <p>I want to let the user upload it in this upload-screen and oly save it as the user say's save in the person screen so i don't want to save 1.001 pictures on the server if they don't click save in the person screen.</p> <p>&nbsp;</p> <p>thanks alot</p> <p>Marvin</p>, 06 Jul 2012 01:52:58 GMTSet values from database when embedding Flash (SWF) file using EMBED in ASP.Net<p>I have this html code for <strong>embedding a CCTV camera</strong> in my aspx page:</p> <pre class="brush: xml">&lt;object id=&#34;VACtrl2&#34; width=&#34;800&#34; height=&#34;600&#34; classid=&#34;CLSID:70EDCF63-CA7E-4812-8528-DA1EA2FD53B6&#34; codebase=&#34;\,0,0,12&#34;&gt; &lt;param name=&#34;ClickEventHandler&#34; value=&#34;1&#34; runat=&#34;server&#34;/&gt; &lt;param id=&#34;Param1&#34; name=&#34;UserName&#34; value=&#34;root&#34; runat=&#34;server&#34;/&gt; &lt;param id=&#34;Param2&#34; name=&#34;Password&#34; value=&#34;&#34; runat=&#34;server&#34;/&gt; &lt;param id=&#34;Param3&#34; name=&#34;RemoteIPAddr&#34; value=&#34;&#34; runat=&#34;server&#34;/&gt; &lt;param id=&#34;Param4&#34; name=&#34;HttpPort&#34; value=&#34;80&#34; runat=&#34;server&#34;/&gt; &lt;param id=&#34;Param5&#34; name=&#34;DisplayErrorMsg&#34; value=&#34;false&#34; runat=&#34;server&#34;/&gt; &lt;/object&gt;</pre> <p>I want to set the 3rd parameters value i.e., <strong>Param3</strong> from my C# code-behind using database table (i.e., the path to the file to be view).</p> <p>This 'Param3' name= 'RemoteIPAddress' field is there in database table (as below)</p> <table border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" width="73"> <p><strong>Id</strong></p> </td> <td valign="top" width="132"> <p><strong>IP Address</strong></p> </td> </tr> <tr> <td valign="top" width="73"> <p>1</p> </td> <td valign="top" width="132"> <p></p> </td> </tr> <tr> <td valign="top" width="73"> <p>2</p> </td> <td valign="top" width="132"> <p></p> </td> </tr> <tr> <td valign="top" width="73"> <p>3</p> </td> <td valign="top" width="132"> <p></p> </td> </tr> <tr> <td valign="top" width="73"> <p>4</p> </td> <td valign="top" width="132"> <p></p> </td> </tr> <tr> <td valign="top" width="73"> <p>5</p> </td> <td valign="top" width="132"> <p></p> </td> </tr> </tbody> </table> <p>How to achieve it.</p> <p>Please reply.</p> <p><br /><br /></p>, 28 Jan 2014 01:59:37 GMTSet MenuItem as Active using CSS class based on URL of the Current Page in ASP.Net<p>Hi,</p> <p>&nbsp; &nbsp; I have a .aspx page where i copied 1 navigation bar. On it i put some link buttons. They are navigating. But when I click it's class should become Active &lt;li class="active"&gt;Home&lt;/li&gt;.&nbsp;If i click on register link button then register's class should become active.&nbsp;</p> <p>&nbsp;</p> <p>Thanks</p>, 16 Aug 2012 01:58:01 GMTSet HREF of HTML Anchor Tag from server side ASP.Net<p>hi&nbsp;</p> <p>&nbsp; how i can bind &lt;a href="?"&gt; from database?</p> <p>thanks</p> <p>&nbsp;</p>, 17 Aug 2012 22:52:42 GMTServer.MapPath: xxxx is a physical path but a virtual path was expected. ASP.Net<p>i used this code ... it is giving this error</p> <p>C:/Users/Administrator/Documents/Visual Studio 2010/Projects/WebApplication1/WebApplication1/CrystalReport3.rpt' <strong>is a physical path, but a virtual path was expected.</strong></p> <p>&nbsp;</p> <pre class="brush: csharp"> protected void Page_Load(object sender, EventArgs e) { ConnectionInfo ConnInfo = new ConnectionInfo(); ConnInfo.DatabaseName = &#34;newMreport&#34;; ConnInfo.UserID = &#34;sa&#34;; ConnInfo.Password = &#34;123456789&#34;; ConnInfo.IntegratedSecurity = true; protected void Button3_Click(object sender, EventArgs e) { DataSet1 dsReport = new DataSet1(); con = new SqlConnection(&#34;Data Source=TRAINING-ROOM-8;Initial Catalog=newMreport;Integrated Security=True;User ID=sa;Password=123456789;&#34;); con.Open(); string strSelect = &#34;SELECT * FROM Transactions&#34;; ConnectionInfo ConnInfo = new ConnectionInfo(); ConnInfo.DatabaseName = &#34;newMreport&#34;; ConnInfo.UserID = &#34;sa&#34;; ConnInfo.Password = &#34;123456789&#34;; ConnInfo.IntegratedSecurity = true; SqlCommand cmd = new SqlCommand(strSelect, con); SqlDataAdapter dAdapter = new SqlDataAdapter(cmd); dAdapter.Fill(dsReport.Tables[&#34;Transactions&#34;]); con.Close(); ReportDocument crystalReport = new ReportDocument(); crystalReport.Load(Server.MapPath(&#34;C:/Users/Administrator/Documents/Visual Studio 2010/Projects/WebApplication1/WebApplication1/CrystalReport3.rpt&#34;)); crystalReport.SetDataSource(dsReport); CrystalReportViewer1.ReportSource = crystalReport; CrystalReportViewer1.DataBind(); CrystalReportViewer1.RefreshReport(); }</pre> <p>&nbsp;</p>, 17 Jul 2012 02:50:52 GMTSendingEmail<p>How can I send email with User password(as suppose user forgot password and as a administrator I have to mail his password), or any other data using asp .net with C#????</p>, 05 Apr 2012 23:52:48 GMTSending SMS with ASP.NET using GSM Modem<p>i have been lookin for code to send sms to a cell phone using gsm modem, but couldn't find a solution. Please lemme know if you can help.</p> <p>Thanks.</p>, 07 Apr 2013 08:37:36 GMTSend SMS ASP.Net<p>How can i send messages to a perticular mobile number from my website using asp .net c#?</p>, 12 Apr 2012 00:03:51 GMTSend DropDownList Selected Item Value to another Page using Session in ASP.Net<p>hi i am facing a problem in my code..i have one drop downlist in my page,i store the values in session ,whenever i select the name of the dropdownlist it will redirect to another page,if i select the firstvalue of the dropdownlist,it redirect to another page,and retrive the session value,in that session value i have a case in my page load,if it is firstvalue of the dropdownlist is selected it will call case 1 and executes,if the second value of the dropdownlist is selected,it will call case 2 and it executes ,its not working properly for is my code</p> <p>dropdownlist.aspx.vb</p> <pre class="brush: vb"> Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged If DropDownList1.SelectedItem.Value = &#34;&#34; Then ClientScript.RegisterStartupScript(Page.[GetType](), &#34;no selection&#34;, &#34;&lt;script language=&#39;javascript&#39;&gt;alert(&#39;Please Select One Company&#39;)&lt;/script&gt;&#34;) ElseIf DropDownList1.Text = &#34;company1&#34; Then Response.Redirect(&#34;default.aspx&#34;) Session(&#34;1&#34;) = DropDownList1.SelectedItem.Value ElseIf DropDownList1.Text = &#34;company2&#34; Then Response.Redirect(&#34;default.aspx&#34;) Session(&#34;2&#34;) = DropDownList1.SelectedItem.Value ElseIf DropDownList1.Text = &#34;company3&#34; Then Response.Redirect(&#34;default.aspx&#34;) Session(&#34;3&#34;) = DropDownList1.SelectedItem.Value End If End Sub</pre> <p><strong>default.vb</strong></p> <p><strong><br /></strong></p> <p>&nbsp;in page load</p> <pre class="brush: vb"> Label39.Text = Session(&#34;1&#34;) Label39.Text = Session(&#34;2&#34;) Label39.Text = Session(&#34;3&#34;) connection.ConnectionString = (&#34;Data Source=RIFAYEE-PC;Initial Catalog=HR;Integrated Security=True;Pooling=False&#34;) Dim a As String Dim count As Integer a = Label39.Text Select Case a Case 1 cmd = New SqlCommand(&#34;select count(*)from company1&#34;, connection) connection.Open() count = Convert.ToInt16(cmd.ExecuteScalar()) + 1 txtempid.Text = &#34;OPA&#34; &amp; count connection.Close() txtfname.Focus() Case 2 cmd = New SqlCommand(&#34;select count(*)from company2&#34;, connection) connection.Open() count = Convert.ToInt16(cmd.ExecuteScalar()) + 1 txtempid.Text = &#34;OPL&#34; &amp; count connection.Close() txtfname.Focus() Case 3 cmd = New SqlCommand(&#34;select count(*)from company3&#34;, connection) connection.Open() count = Convert.ToInt16(cmd.ExecuteScalar()) + 1 txtempid.Text = &#34;OPM&#34; &amp; count connection.Close() txtfname.Focus() End Select<br />pls help me</pre> <p>&nbsp;</p>, 07 Dec 2012 00:14:17 GMTSecuring web application in ASP.Net<p>i have 2 applications in dotnet</p> <p>1. &nbsp;windows application using;</p> <p>2. web application using c#</p> <p>&nbsp;</p> <p>after the application is built &amp; deployed at the clients location i want the application to be locked or secured so that the client cannot make a copy of the application and install at some other location</p> <p>how can this system be incorporated in the existing application</p> <p>&nbsp;</p>, 19 Nov 2012 08:01:47 GMTRetrieve data from Database when I press a button in ASP.Net<p>Hi!</p> <p>I would like to ask you how can I retrieve data from a database when I press a button?</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>'Response.Write "&lt;script type='text/javascript'&gt;"</p> <p>'Response.Write "$function btClick2(sql)"&nbsp;</p> <p>'Response.Write "{"</p> <p>'Response.Write "String sql = 'SELECT ID,CreateDate, UnitType, StationName FROM MyTable'"</p> <p>'Response.Write "return sql;"</p> <p>'Response.Write "}"</p> <p>'Response.Write "&lt;/script&gt;"</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>query = btClick2()</p> <p>&nbsp;</p> <p>Response.Write "&lt;Button OnClientClick='btClick2()' Text='Click Me' runat='server' /&gt;"</p> <p>&nbsp;</p> <p>This is just the part that is not working and I don't know if is correct!</p> <p>&nbsp;</p> <p>Thanks and have a nice day!</p> <p>&nbsp;</p>, 15 Aug 2012 03:54:32 GMTRetreive PDF file stored om SQL Server Database and then display on page<p>in gridview i have two link button that is &nbsp;"VIEW" &nbsp;and "DOWNLOAD" &nbsp;if i click "view" that pdf file wll display in an other page if i click download that file will be downloaded..&nbsp;<br /><br />how can i do this.. is thereany simple way &nbsp;...&nbsp;</p>, 23 Sep 2012 03:07:18 GMTRegular Expression Validator to validate Valid Internet URL format<p>hi....</p> <p>I want to validate Internet Regular expression validation....</p> <p>But it <strong>should accepts</strong>..followings..</p> <p>&nbsp;</p> <p></p> <p></p> <p>3.</p> <p>4.</p> <p>&nbsp;</p> <p>should not accept</p> <p></p> <p>2.http://www.hdfcbankcom (without dot(.))</p> <p>&nbsp;</p> <p>Can u help me...\?</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p>, 17 Dec 2012 22:47:19 GMT