asp.net

asp.net mvc selectlist

by using selectlist how can i enter the please select. is there a way GrpDown = new SelectList(_db.Groups.Where(m => m.vcr_GroupName != "SuperAdmin" && m.int_Priority >= Authorization.Priority && m.bit_Active == true).ToList(), "int_GroupId", "vcr_GroupName"); ...

How to share contents of a web page with social Networks and bookmarking them in on-line bookmark services??

Hi, I'm Looking for a free(or Open Source) Sharing Script to put it in my content pages(I do ASP.net). I want to allow my visitors to share contents(ex: articles) in social networks like Facebook or on-line bookmark services like google bookmarks. what's the best way to do that? i found JQUERY SHARING(you can see demo here) Plugin from t...

dynamically set hyperlink control's navigateurl property inline

Is there a way to do something like this: <asp:HyperLink id="MyLink" NavigateUrl="../mypage.aspx?id=<%= pageid %>" runat="server">My Page</asp:HyperLink> ... except in a way that works? I want to do this inline in a normal HyperLink control that is not databound. Edit: Got some good answers, but what I'm looking for is how to do...

IIS Dynamic Compression and RouteCollections (Rewritten URLs)

Hello, When a page is served, i.e., http://some.tld/FAQ.aspx, dynamic compression works just fine; The aspx extension is registered as a file type to compress. But when using routes.MapPageRoute to rewrite the url as some.tld/FAQ IIS will not compress this page. There's no extension to register here. Does anyone know how to get IIS to...

How can I use ImageFormatConverter.ConvertFromString to convert a string containing HTML response to an image?

This is what achieved, help please: in pageload { panelmain.Controls.Add(abc); panelmain.Controls.Add(grid1); string toexport; toexport = RenderControl(panelmain); ImageFormatConverter imgc = new ImageFormatConverter(); System.Drawing.Image convertedimage; convertedimage = (System.Drawing.Image) imgc.Conver...

convert stream to zip file

Hi, I have made a WCF web service that streams a 200 mb zip file. Can some one please advise me on how i can read this stream at my client and then give option to the user to download that Thanks ...

How can I find the (file) name of the current page in ASP.NET?

How can I find the name of (default.aspx ) current page or web control in the code behind? I want to write a superclass that uses this name. ...

Validation of Viewstate MAC failed. Using .Net Framework 3.5. Not using form action.

Hi Guys, I know this question has been asked million times but I think my situation is different here. I am using .NET Framework 3.5 SP1, there is no form action on the page and it's not happening when I try to submit the form quickly. I am not on a web farm either. I have a page with two GridViews. One Gridview acts as a master gridv...

Updating JQuery UI Progressbar inside Updatepanel

How can I use JQuery UI Progressbar inside Updatepanel? When I try to do the following, progresbar is not being updated when it's inside updatepanel. <script type="text/javascript"> $(document).ready(function() { $("#progressbar").progressbar({ value: 0 }); $("#progressbar").css({ 'background': 'LightYellow' }); $("#progre...

text box have it,s text from DDl

I have a drop-down list which gathers data from the database and a textbox which contains the text from the drop-down list when I select a value from the drop-down list. I tried to make this work, but no data appears in the textbox when I select a value from the drop-down list and no errors appear either. Can anyone help me? aspx Code: ...

how to convert response stream to an image? revised

please note this link http://stackoverflow.com/questions/334532/render-html-as-an-image is not help full in previously asked question answeres said they dont get what i want to do exactly so heres is the full code also i simply want that instead of a TABLESe i rendered an image( of the content ) on the page using System; using System....

asp.net gridview paging

I have a grid view which has 10 rows. I have set paging = true and pageSize = 2 Now when I try to navigate through the page by the below mentioned link like 1, 2, 3 , I then receive error something like need event pageIndexChanged. I added this event but do not understand what code should I add to this event to navigate to next page b...

Is NLog work with customErrors?

when i use <customErrors mode="Off"/> and i have an error on the screen it writes to log file but when i use <customErrors mode="RemoteOnly"/> then i see my custom error page but error not catches but logger :-/ ...

asp grid view check box to presrver on neigation(paging)

In a grid view i have used paging for that i have used the view state to store datatale to bind it on GridView1_PageIndexChanging event every thing works fine but the problem happens with the first column which is having the checkbox placed in each row . On navigation all checked check box becomes unchecked how to maintain the state of...

BadImageFormatException during .Net assembly load issue

...

SwfUpload and jquery .show and .hide

I'm trying to get swfUpload to work in my application for file uploads. It works, but I want to show the file upload only if the user clicks on a button (for design reasons, and because I need to have other values available on the page before this upload is created). But in order to wait to show this upload, I have to hide the form with...

How can i set up a windows service to listen to events on a remote machine

I have a asp.net web app and a windows service running on separate machines. How can i enable the windows service subscribe/listen to events raised by the asp.net app on the remote machine? What methods can i use? An example of events that can be raised on the asp.net app is a user uploading a file. Once the upload has completed the ...

ASP.NET/Javascript hyperlink popup menu upon left click

I need to display a mobile-phone compatible popup menu when user left-clicks a HyperLink control. A menu will contain various options for this link, so its handler had to be aware of the clicked link data (actually, each link corresponds to a nickname). What do I need to make that work?:) ...

How to get value of TextBox before postback in ASP.NET

I have a TextBox(enabled with PostBack). I need to store the value of it before it's postback. Is it possible? If so, can you please tell me how? Eg : I enter "10" in my TextBox. Then, in it's PostBack, a message box appears, telling "You have entered Ten!". Next, I enter "100" in my TextBox, this time, a message box appears and tells,...

CommandEventArgs null value in OnCommand event handler for a Custom WebControl implementing IButtonControl

Hello everyone. I am very sorry for the long title but I really didn't know how to be more self explaining than this. The problem I have is this: I designed and developed a WebControl which consists in a simple set of elements that, combined togheter in the simplest way, defines a custom button. This control is the one I would like to u...