I'm having a little trouble with using regex in linq. I want to be able to perform a search on values in my database. The goal is to insert a value into the regex and then use that to search a column in a table in my database for that term. I want it to work so that it gets all exact matches and also returns matches in which the search term is a substring of the term in the column.
I was trying to follow this tutorial on msdn, but it doesn't quite fit perfectly with my problem:
I am trying to make a UserControl that have all data process, initialize data, ajax, all self contain into one control.So I can insert to anywhere on my Asp pages.But the problem is, the UserControl contains a Script Manager and the Page that contain that User Control has a Script Manager too, so Asp doesn't allow me to have two Script Manager in one page.In case like this, I wonder if UserControl can completely self contain?Or the proper way of using UserControl is just using it like a template, and all the data process, event handler I have to do on the page that contains the UserControl?
I am a .NET web designer and I wish to create a modular based website for people, similar to what DNN does (but I want to create my own cut down version).
The idea is that I create a base website that can 'activate' features which the client needs (and has paid for). These features may be used by many clients which require frequent future updates for all clients (so I wish to keep upgrade time down to a minimum).
For example, I upload the base web application using web deploy and it sets up the core database tables/views/SPs in the process.Then I login into the website as developer and activate the out of the box features that I wish to permit the user to take advantage of. The only way I can think of currently is via user control, resources etc..But I need a little of your experience and advice over what the possibilities / dangers are....
e.g. images for an application e.g. blog, that I have activated for a client - how do I reference those images
e.g. Can user controls be dynamically added to a web application (which is pre-compiled unlike a website - it must be a web application since I am using web deploy).
e.g. Modification of web.config to add additional routing (doesn't matter if app has to go down to do this).
I can upgrade websites features en-mass, rather than manually enhancing each individual website which given a certain amount of clients would result in an awful amount of time lost.I do not have access to sharepoint (nor do I intend to). how to automate modularity completely via a front end in asp.net would be superb! how to reference files and resources outside of the websites directory and without using virtual directories
Say I have a DisplayTemplate called String.ascx and all string properties get rendered using this style, even if I don't have a UIHint attribute on the model class.
Now, I want a way to say..
'for this particular string property, don't use the template and render normally'.
I don't want to create another template with a default rendering.
So is there any [UIHint(Ignore)] or some such way?
I am currently using Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") to get information via XML. The App was built connecting from Point A to Point B, with A & B being 2 servers in different locations. Through a cloud, we setup both locations on the same server with different hostheaders... Since this happened, we are getting an "invalid cert." error when we try and make the XML connection. I changed to code to invoke SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS, but it was recently brought to my attention that this could in fact be invalidating the SSL, and the connection is no longer secure. Does anyone know if thats the case?
If so, is there typically a problem with 1 server establishing an SSL connection between itself? The certificate has remained the same (a wildcard cert. enabling *.mysite.com) just the physical location of the servers is what moved (And technically the version of IIS was upped to 7).
If i have 3 asp.net checkboxes in my asp.net webform namely : CheckBox1, Checkbox2, Checkbox3 and a textbox namely textbox1
If Checkbox1.text ="1" Checkbox2.text ="2" Checkbox3.text ="3"
I WANT :
if checkbox1 is already checked ... if checkbox is remain checked and even after i check checkbox2 and checkbox3 then the output in textbox would be 2,3 ..... by ignoring already checked checkbox text ...
LOGIC I WANT : Ignore already check checkboxes and insert recent checkbox text to textbox1 as comma seperated string ...
Our current web portal at work was a port from a classic ASP codebase. Currently, all pages in our project extend a custom Page class called PortalPage. It handles login/logout, provides access to a public User object for the currently authenticated user, and adds the standard page header and footer to all of our pages. Every Page in our site is 100% designed in the codebehind. The ASPX page is not used at all. Every single div, img, and block of text is allocated as an object and added from a C# function, even if it is completely static content (which we have a decent amount of). Example for a page header:
HtmlGenericControl wrapperDiv = new HtmlGeneric("div"); HtmlAnchor bannerLink = new HtmlAnchor(); HtmlImage banner = new HtmlImage(); bannerLink.HRef = "index.aspx"; banner.Src = "mybanner.png"; banner.Alt = "My Site"; bannerLink.Controls.Add(banner); wrapperDiv.Controls.Add(bannerLink); this.Page.Controls.Add(wrapperDiv);
Even worse, all Javascript is added to the page as a giant mess of string concatenations:
I want to create a complete dynamic view engine in that absolutely all html content will be loaded from a database. This is so I have a templating engine that is totally customisable. I have something similar in classic asp and the way that works is with fillpoints so you have a master page html which will just be a string when extracted from the database and then content is dynamically added to the string to sections identified by a fill point. So for example I have my master page content loaded into a C# string and I want to load a main view and a partial view onto the page, how would you go about that in MVC? I guess I would have to keep the fill point idea as there is no other way to know where the content will go. I'm just after opinions from the community really on how to go about it.
What I have is a masterpage with some tables and contentplaceholders. What I want in some pages is that a table be removed because i have 3 columns on 3 tables and i need 2 columns only(so minus one table). Now i can access the table and give it some css through code but what i give is width:0 (and visibility:hidden if ever successful). The table contains one contentplaceholder inside a <td>. I can also access the td.The problem is that the table (thus contentplaceholder) will not go away.
It remains as entity as extending the second column will just push it downside(behavior expected when the column3 with contentplaceholder is present). So is there a way to remove the table holding the contentplaceholder?Only thought is to hide it and push it right that i admit i haven't tried it yet, I suppose it would be easier to make another master page but the problem is that i want specific designs on many pages so if this does not work i would either have to make many master pages or just use simple pages.
I built an assembly, and that assembly refereces a DLL in my bin folder (lets call it Bob.dll). so multiple users may have different versions of Bob.dll...but by and large they all function the same.
However when my assembly gets dumped into the bin folder, it wants the version it was compiled against.
Is there a way to compile a reference such that it'll just be happy with ANY version?
I know it can be done with assembly binding in the webconfig, but I dont want users to have to do that.
I've got a ajax page with 2 panels on it. On Panel1 there is a next button. On that panel there is a pref. button and a next button. But if i put the pref. button he should do an action, but thats not possible because there are requestedfieldvalidators on that page. So i need to fill the page first, and then i can go back.
But on the next i want the validators. How can i make this possible?
I am working on my CMS project based on ASP.Net MVC2, I have implemented my VirtualPathProvider and VirtualFile for my master page, to use a master page in db.
It works as below: I indicate the MasterPageFile in the aspx/ascx file.
<%@ Page MasterPageFile="/Content.master"
Then override VirtualPathProvider.GetFile to load the master page from db, "/Content.master" is the key to search in the db.
Everything works fine for me, except
IF I click "Build Web Site" in the context menu in VS2010, I will get an error says "The file '/Content.master' does not exist."
My master page is stored in db and this error is normal, Is there a way that VS2010 can ignore this error?
I am looking into the BuildManager relative code, seems complicated.
I am trying to populate an asp:Menu control using an XML file. I want the menu node's to display horizontally across the control in a static view, and have the SubMenu nodes expand dynamically from them.
The problem is I don't want the Top node to show up at all. Right now my menu has the Top node show and everything else expands dynamically from that. How do I tell it to ignore the Top node for my menu?
I've tried the following two methods to try and ignore my "Assets" folder, but I keep coming up with errors. Can anyone tell me exactly how the Ignore Regex is supposed to look?
routes.IgnoreRoute("/Assets/") routes.IgnoreRoute("{*assets}", New With {.assets = "/Assets/(.*)"})
How to completely disable ControlState in an ASP.NET website application to get rid of <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/ACBDEFGH...XYZ=" /> on every page?
Searching for a solution, I only found meaningless answers making no difference between ControlState and ViewState, or replies saying that "we cannot disable control state". The second assumption seems to be false, since StackOverflow pages do not have ViewState hidden field.