Getting Startedhttp://forums.asp.net/15.aspx/1?Getting+StartedIf you have a general ASP.NET question on a topic that's not covered by one of the other more specific forums - ask it here.Sun, 19 May 2013 16:25:56 -0400urn:uuid:00000000-0000-0000-0000-000000000015urn:uuid:00000000-0000-0000-0000-000005399166http://forums.asp.net/p/1908094/5399166.aspx/1?When+opening+a+link+Bad+Request+is+givenWhen opening a link, Bad Request is given <p>I have a GridView control. One of its column is</p> <pre class="prettyprint">&lt;asp:TemplateField HeaderText=&quot;الرابط&quot;&gt; &lt;ItemTemplate&gt; &lt;asp:HyperLink ID=&quot;AttachmentLink&quot; runat=&quot;server&quot; NavigateUrl='&lt;%# Eval(&quot;Attachments&quot;) %&gt;' Target=&quot;_blank&quot; Text='الصورة'&gt;&lt;/asp:HyperLink&gt; &lt;/ItemTemplate&gt; &lt;ItemStyle BorderWidth=&quot;1px&quot; Width=&quot;5%&quot; HorizontalAlign=&quot;Right&quot; /&gt; &lt;/asp:TemplateField&gt;</pre> <p>When clicking on this field where its &quot;Attachments&quot; value is <strong>&quot;C:\Users\User\Desktop\old desktop\SPSS software\SPSS\Installation Documents\Hardware Key.pdf&quot;</strong>, I got error &quot;Bad Request&quot;</p> <p>Why this error arise where the pdf file existing<br> <br> </p> <p></p> 2013-05-20T00:26:14-04:002013-05-20T00:26:14-04:00urn:uuid:00000000-0000-0000-0000-000005399146http://forums.asp.net/p/1908091/5399146.aspx/1?Everything+was+running+smoothly+suddenly+Microsoft+JScript+runtime+error+DOM+Exception+NOT_FOUND_ERR+8+Everything was running smoothly suddenly "Microsoft JScript runtime error: DOM Exception: NOT_FOUND_ERR (8)" <p>I developed my .aspx pages and debug them many times and run them many times successfuly. Then suddently the following strange error arise: <strong><em>Microsoft JScript runtime error: DOM Exception: NOT_FOUND_ERR (8)</em></strong></p> <p>What is the story behind this?</p> <p>Thanks</p> <p></p> 2013-05-19T22:45:31-04:002013-05-19T22:45:31.24-04:00urn:uuid:00000000-0000-0000-0000-000005399038http://forums.asp.net/p/1908053/5399038.aspx/1?How+to+make+my+page+blocks+a+scriptHow to make my page blocks a script <p>Hi there guys</p> <p>This question is kinda dirty! But well...^_^</p> <p>Im hosting my webpage in www.somee.com&nbsp;and its a really good page to host ASP.NET and database, but this page always shows a little add at the bottom of my page, i would like to know what can my page do to quit it. The script is this:</p> <p>I would like that my page block that script with the Load even of the codebehind</p> <p></p> <pre id="line1"><span class="comment">&lt;!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE--&gt;</span><span> <span id="line185"></span></span><span title="Etiqueta de apertura “center” extraviada." class="error">&lt;<span class="start-tag">center</span>&gt;</span><span></span><span>&lt;<span class="start-tag">a</span> <span class="attribute-name">href</span>=&quot;<a href="" class="attribute-value">http://somee.com</a>&quot;&gt;</span><span>Web hosting by Somee.com</span><span>&lt;/<span class="end-tag">a</span>&gt;</span><span></span><span>&lt;/<span class="end-tag">center</span>&gt;</span><span> <span id="line186"></span></span><span title="Etiqueta de cierre “textarea” extraviada." class="error">&lt;/<span class="end-tag">textarea</span>&gt;</span><span></span><span title="Etiqueta de cierre “xml” extraviada." class="error">&lt;/<span class="end-tag">xml</span>&gt;</span><span></span><span title="Etiqueta de cierre “script” extraviada." class="error">&lt;/<span class="end-tag">script</span>&gt;</span><span></span><span title="Etiqueta de cierre “noframes” extraviada." class="error">&lt;/<span class="end-tag">noframes</span>&gt;</span><span></span><span title="Etiqueta de cierre “noscript” extraviada." class="error">&lt;/<span class="end-tag">noscript</span>&gt;</span><span></span><span title="Etiqueta de cierre “object” extraviada." class="error">&lt;/<span class="end-tag">object</span>&gt;</span><span></span><span title="Etiqueta de cierre “layer” extraviada." class="error">&lt;/<span class="end-tag">layer</span>&gt;</span><span></span><span title="Etiqueta de cierre “style” extraviada." class="error">&lt;/<span class="end-tag">style</span>&gt;</span><span></span><span title="Etiqueta de cierre “title” extraviada." class="error">&lt;/<span class="end-tag">title</span>&gt;</span><span></span><span title="Etiqueta de cierre “applet” extraviada." class="error">&lt;/<span class="end-tag">applet</span>&gt;</span><span> <span id="line187"></span></span><span>&lt;<span class="start-tag">script</span> <span class="attribute-name">language</span>=&quot;<a class="attribute-value">JavaScript</a>&quot; <span class="attribute-name">src</span>=&quot;<a href="" class="attribute-value">http://ads.mgmt.somee.com/serveimages/ad2/WholeInsert4.js</a>&quot;&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span><span> <span id="line188"></span></span><span class="comment">&lt;!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE--&gt;</span></pre> <p></p> 2013-05-19T16:47:59-04:002013-05-19T16:47:59.177-04:00urn:uuid:00000000-0000-0000-0000-000005399117http://forums.asp.net/p/1908082/5399117.aspx/1?Problem+to+run+javascript+code+inside+my+code+behind+Problem to run javascript code inside my code behind. <p>Hi</p> <p>i have a simple aspx form which should display news via javascript code.</p> <p>here is my sample aspx form which works correctly :</p> <pre class="prettyprint">&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Default.aspx.cs&quot; Inherits=&quot;TestEffects._Default&quot; %&gt; &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt; &lt;head runat=&quot;server&quot;&gt; &lt;script language=&quot;JavaScript&quot; src=&quot;TypingScroller2.js&quot;&gt; &lt;/script&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;</pre> <p>but when i comment above script tag and write code in my aspx code behind to load and execute javascript file, nothing happen!!!</p> <p>here is my csharp code :</p> <pre class="prettyprint">protected void Page_Load(object sender, EventArgs e) { string jsFileContent = System.IO.File.ReadAllText(Server.MapPath("~/TypingScroller2.js")); string lineContent = "This is line "; string specialChar = "#"; for (int i = 1; i &lt;= 5; i++) { lineContent = lineContent + i.ToString(); string findWhat = string.Format("{0}{1}{2}{3}", specialChar, "Line", i, specialChar); jsFileContent = jsFileContent.Replace(findWhat, lineContent); } this.ClientScript.RegisterStartupScript(this.GetType(), "Key", jsFileContent, true); }</pre> <p>where is my problem and how to solve it ?</p> <p>thanks in advance<br> <br> <br> </p> 2013-05-19T20:09:01-04:002013-05-19T20:09:01.203-04:00urn:uuid:00000000-0000-0000-0000-000005398887http://forums.asp.net/p/1908016/5398887.aspx/1?Microsoft+Certifications+for+ASP+NET+developer+aspiring+to+become+a+Technical+Architect+in+futureMicrosoft Certifications for ASP.NET developer aspiring to become a Technical Architect in future <p>I am an ASP.NET Developer and would like to specialize in or&nbsp;remain on the technical side itself, as I scale up the ladder in this industry.&nbsp;It is a general tendency to shift towards the managerial side as you scale-up. But, I would prefer to be on the technaical side and be a technical architect few years down the line. I am considering, going for few certifications as the first step. I went through the subjects covered in MCSD and it looks fine to me. But, in MCSM, the next step, I can't find anything of relevance to a .NET developer. Everything seems to be server administration related. Do you have any suggestions or advises.</p> <p>Thanks&nbsp;in advance.&nbsp;&nbsp;&nbsp;</p> 2013-05-19T09:31:02-04:002013-05-19T09:31:02.643-04:00urn:uuid:00000000-0000-0000-0000-000005399063http://forums.asp.net/p/1908060/5399063.aspx/1?The+method+Skip+is+only+supported+for+sorted+input+in+LINQ+to+EntitiesThe method 'Skip' is only supported for sorted input in LINQ to Entities <p>Hi,</p> <p>I am using EF with ASP.NET and when I turn on Enable Paging in GridView Tasks I get this message:</p> <h2>The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.</h2> <p>Anyone, any idea?</p> <p>Thanks</p> 2013-05-19T17:49:59-04:002013-05-19T17:49:59.357-04:00urn:uuid:00000000-0000-0000-0000-000005399073http://forums.asp.net/p/1908065/5399073.aspx/1?How+can+you+sign+application+data+to+prevent+tamperingHow can you sign application data to prevent tampering <p>Hi Guys,</p> <p>I'm studying for the microsoft asp.net mvc exam and there is a segment titled &quot;sign application data to prevent tampering&quot;.</p> <p>What does this mean? &nbsp;I can't find any information about this when I check google.</p> <p>I don't know if this means generate a hash from your data and check it later, or if it means encrypting it some how, or something else entirely.</p> <p>Can someone explain how I can achieve this, and ideally provide a few links with demos that I can check out.</p> <p>Thanks.</p> 2013-05-19T18:19:57-04:002013-05-19T18:19:57.243-04:00urn:uuid:00000000-0000-0000-0000-000005398984http://forums.asp.net/p/1908034/5398984.aspx/1?How+to+make+search+functionality+faster+in+asp+net+web+application+How to make search functionality faster in asp.net web application. <p>I always wonder when I look serach&nbsp;functionality of Google,Facebook and Twitter. Can I apply this type of superfast seraching functionaltyIn my asp.net web application. In my application I want to serach a word from huge records in sql server 2008. I dont want to disaplay all records. But when I type some words in textbox by using Auto complete Extender of ajax the records should come faster. If I type the full username for example <strong>microsoft </strong>than my search functionality should find this word in millions of records in database.</p> <p>Which is the best method can use to make my search fuctionality very much faster? I dont want to serch word in full paragraph. I want to search word like small username from database from username column which has millions of records (usernames).</p> <p>Best example - In twitter's search box we search @username or #topic. &nbsp;</p> <p></p> <p></p> <p>&nbsp;</p> 2013-05-19T13:36:47-04:002013-05-19T13:36:47.91-04:00urn:uuid:00000000-0000-0000-0000-000005398960http://forums.asp.net/p/1908030/5398960.aspx/1?Transfer+data+from+one+page+to+another+Transfer data from one page to another. <p>Hi, I'm just a beginner.&nbsp;</p> <p>I want to create a web page in ASP.NET where user fills his name, address, city and after that &nbsp;clicks on &nbsp;&quot;next&quot; button. Then, he moves on another page where he has to submit his contact details..&nbsp;</p> <p>So, after filling &nbsp;the contact details, he again clicks &quot; next&quot; &nbsp;button and &nbsp;sees all his detail (name, address, city, contact no) &nbsp;</p> <p>so please help me out.. How to transfer data from one page to another...&nbsp;</p> 2013-05-19T12:43:11-04:002013-05-19T12:43:11.443-04:00urn:uuid:00000000-0000-0000-0000-000005398882http://forums.asp.net/p/1908014/5398882.aspx/1?Hi+programersHi programers <p>I want to know</p> <p>How to export the data from gridview to excel in asp.net</p> <p></p> <p>please help me</p> 2013-05-19T09:07:56-04:002013-05-19T09:07:56.417-04:00urn:uuid:00000000-0000-0000-0000-000005396899http://forums.asp.net/p/1906732/5396899.aspx/1?password+recovery+in+asp+net+3+teir+architecturepassword recovery in asp.net 3 teir architecture <p>password recovery in asp.net 3 teir architecture.</p> <p>i create a recovery email in html which i want to send on email id . </p> 2013-05-17T11:04:00-04:002013-05-17T11:04:00.02-04:00urn:uuid:00000000-0000-0000-0000-000005398971http://forums.asp.net/p/1908033/5398971.aspx/1?List+ContainsList Contains <p>Hi Guys,</p> <p>I have Interface call IFoo, Foo1,Foo2,Foo3 Inherit IFoo</p> <p>List&lt;IFoo&gt; list = new List&lt;IFoo&gt; { new Foo1(), new Foo2(), new Foo3() };<br> var b = list.Contains(new Foo1());</p> <p>Why above code it's always show &quot;false&quot;, it's should return true when i try change object to List&lt;Int&gt; work fine.</p> <p>Regards</p> 2013-05-19T13:07:11-04:002013-05-19T13:07:11.89-04:00urn:uuid:00000000-0000-0000-0000-000005398879http://forums.asp.net/p/1908012/5398879.aspx/1?Search+and+create+a+folder+on+ftpSearch and create a folder on ftp <p>Hi,</p> <p>I have never worked with ftp before so I know nothing about the coding.</p> <p>I want to search a directory called &quot;/Images/P/old pics&quot; and if &quot;old pics&quot; not exists on the ftp server (ftp.mysite.com, with username: user1 and password: password1) it creates it.</p> <p>Please do not redirect me to any other pages, please tell me what codes should I write?&nbsp;</p> 2013-05-19T08:58:51-04:002013-05-19T08:58:51.19-04:00urn:uuid:00000000-0000-0000-0000-000005398947http://forums.asp.net/p/1908027/5398947.aspx/1?Has+Some+TypeOf+Class+Has.Some.TypeOf<Class>() <p>Hi Guys,</p> <p>What is Has.Some.TypeOf&lt;Class&gt;() in NUnit to MSTest?</p> <p>Thanks</p> <p></p> 2013-05-19T12:03:01-04:002013-05-19T12:03:01.71-04:00urn:uuid:00000000-0000-0000-0000-000005398920http://forums.asp.net/p/1908024/5398920.aspx/1?How+to+create+a+subroutine+to+be+used+by+all+pagesHow to create a subroutine to be used by all pages <p>Hi all</p> <p>I have created a sub to verify the logged in user. This sub is called on page load event.</p> <p>I want to run this code on all pages. I don't want to write this code on every page.</p> <p>What is the good way to solve this issue.</p> <p>Thank you.&nbsp;</p> 2013-05-19T11:09:09-04:002013-05-19T11:09:09.383-04:00urn:uuid:00000000-0000-0000-0000-000005398896http://forums.asp.net/p/1908020/5398896.aspx/1?How+to+copy+image+from+one+folder+to+anotherHow to copy image from one folder to another <p>Hi Friends I want to Copy Image from One folder to another on button click</p> <p>Thanks&nbsp;</p> 2013-05-19T09:56:54-04:002013-05-19T09:56:54.73-04:00urn:uuid:00000000-0000-0000-0000-000005398864http://forums.asp.net/p/1908008/5398864.aspx/1?paginating+a+large+text+filepaginating a large text file <p>Hi all:</p> <p>I have a master/details where the master is a gridview and the details is a detailsview, tipycal</p> <p>The detailsview contains only a large text file,, only one record</p> <p>I want to paginate this large file, so, imagine, paginate&nbsp;500 characters each page.</p> <p>How to do that? If I paginate the detailsview, the BOL says it paginates each record, so it doesn't work for my purpose.</p> <p>Thanks in advance if u can tell any ideas.</p> 2013-05-19T07:06:54-04:002013-05-19T07:06:54.037-04:00urn:uuid:00000000-0000-0000-0000-000005398861http://forums.asp.net/p/1908005/5398861.aspx/1?passing+a+parameter+to+a+method+in+usercontrolpassing a parameter to a method in usercontrol <pre class="prettyprint">public void ShowLog(int IssueID) { DataTable dt = new Management.BussinesLogic.BL_Issue().DisplayLog(IssueID); }</pre> <p>&nbsp;</p> <p>this is a function in my usercontrol</p> <p>i wan to pass the parameter IssueID to it from another page.</p> <p>in the click event of that page i want to use that method.</p> <p>how can i use it?</p> <pre class="prettyprint"> protected void btnLog_Click(object sender, EventArgs e) { Response.Redirect("");//???????????????????????? }</pre> <p></p> <p></p> 2013-05-19T06:36:52-04:002013-05-19T06:36:52.547-04:00urn:uuid:00000000-0000-0000-0000-000005398883http://forums.asp.net/p/1908015/5398883.aspx/1?Insert+Image+Path+In+DataBase+And+Copy+Image+From+One+folder+to+anotherInsert Image Path In DataBase And Copy Image From One folder to another <p>Hi</p> <p>I Want to Insert Image in Byte as well as its Path in Database&nbsp;</p> <p>Actually,</p> <p>I Am Developing a Social Networking side in which On Register Page Fileds Are:</p> <p>Name ,EmailId,Password Etc</p> <p>But File Upload Control is not there&nbsp;</p> <p></p> <p>There Is a folder in which i have stored one image&nbsp;</p> <p>when i click on button,The image which is in That folder is converted to binary and stored in database and copy that same image in another folder&nbsp;</p> <p></p> 2013-05-19T09:13:14-04:002013-05-19T09:13:14.553-04:00urn:uuid:00000000-0000-0000-0000-000005398779http://forums.asp.net/p/1907977/5398779.aspx/1?The+conversion+of+a+varchar+data+type+to+a+datetime+data+type+resulted+in+an+out+of+range+value+The+statement+has+been+terminatedThe conversion of a varchar data type to a datetime data type resulted in an out-of-range value.The statement has been terminated <p>i have created one table &amp; it contains a column as datatype datetime when execute the below statement of code i get the above error.</p> <p>can anyone help me????</p> <p>here is the code under a button click event..</p> <p>DataSet dsLogin = objManageUser.CheckAdminLogin(txtUserName.Text.Trim(), txtPassword.Text.Trim());<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataTable dtLogin = dsLogin.Tables[0];<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dtLogin.Rows.Count &gt; 0)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlDataReader dr = objManageUser.GetAdminLastAccessed();<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dr.Read() == true)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateTime dtCurrent = DateTime.Now;<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dr[&quot;LastAccessedDateTime&quot;].ToString() == String.Empty)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session[&quot;dtLastAccessed&quot;] = dtCurrent.ToString(&quot;MM dd yyyy&quot;);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objManageUser.UpdateAdminLastAccessed(dtCurrent);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session[&quot;dtLastAccessed&quot;] = Convert.ToDateTime(dr[&quot;LastAccessedDateTime&quot;]).ToString(&quot;MM dd yyyy&quot;);<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; objManageUser.UpdateAdminLastAccessed(dtCurrent);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> 2013-05-18T18:37:46-04:002013-05-18T18:37:46.31-04:00