Web Forms :: How To Change A Parameter To A Web Part At Runtime
May 21, 2010How can I change a parameter to a web part at runtime?
View 1 RepliesHow can I change a parameter to a web part at runtime?
View 1 Repliesthis is my code:
[Code]....
some of my col datatype is nVarchar...
in run time because my value in my table (dt_excel_allRows) are FARSI ; the sequence of my parameter changed and it cant be executed!!!!!
of course the problem is because of FARSI is rtl languges....
i can not user sqlPArameter becuse of some reason....
i think some thing like rtl or ltr can fix my problem....but how?
i have the below code for passing parameters to crystal reprot & displayin g the report
1) even though i am passing parameter values i get a screen where its asking for the values
Parameter Field(s)
dept
Value
need to avod this
when the page is loaded no parameter values are passed
2) after enetring the value in the textbox when i click submit i get th e logon error
customerReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ParameterFields paramFields = new ParameterFields();
ParameterField paramField = new ParameterField();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue(); paramField.Name = "dept"; paramDiscreteValue.Value = drpdept.SelectedItem.Text; paramField.CurrentValues.Add(paramDiscreteValue); paramField.Name = "emp"; paramDiscreteValue.Value = drpemp.SelectedItem.Text;
[Code]......
I need to allow the user to submit queries as follows;
/search/"my search string"
but it's failing because of request validation, as outlined in the following 2 questions:
[URL]
I'm currently trying to figure out how to disable request validation for the quote character, but i'd like to know the risks before I actually put the site live with this disabled?
I have a page with two columns. Initially, the left column will contain a list of links that are article titles. Clicking on one of the links will display the text of the article in the right column, keeping the list of titles in the left column. Clicking on another title will clear the text of the first article and display the second. Is there a way to accomplish this without having to repaint the whole page? I would rather not have the whole page resent each time a title is clicked, but rather have the page stay as is and only the contents of the right column get cleared and redisplayed. I assume there's a way to do this with JavaScript.
View 5 RepliesIs it possible to change a parameter's property after the uer has made a selection or filled in another parameter field? I'm using VS2005
Case:
- 3 parameter fields; Country,Station,Carrier all three are textfields and are allowed to stay 'blank'.
- When the user enters a Country-code in the 'Country' parameter field, the 'Carrier' parameter should become a required field.
I did some searching on the net, but haven't found the solution. I started to wonder if it's actually possible?
In my website1, I posted some data to my website2 by doing an HttpWebRequest.The data are posted successfully but what I wanna do is change the imageUrl in website2 after website1 fired some data. When I try to debug, I can see that it passes through the code of changing the ImageUrl, but when I view the source of website2, I can't see the imageUrl being change at all... Does anyone have a clue?
View 3 Repliesi m using embed tag for displaying video file.i want to change file in src attribute of embed tag runtime when i click on button.how can i access embed tag in my .cs file .
View 2 RepliesHow to change the css classname of <div> tag at runtime in c#?
View 6 RepliesI am sending email in asp.net using c#. I want to change the From part of the email to something meaningfull instead of the email address. For example instead of [URL] I want the user to see "[URL] support team".
[code]....
I am getting the following error:
Must declare the scalar variable "@Approved"
I want to add a parameter to my SqlDataSource1 when certain controls are checked.
[Code]....
I have a user control which I call like this:
<MyNamespace:MyControl runAt="server" ID="foo" /> Is there any way I can determine the ID parameter at run-time and pass it in?
one of my client has the requirement of changing the latest news section of website dynamically or runtime so not to publish the site and host it agian and again.this section is in master page how can i achieve this in asp.net c#
View 4 RepliesHow can i change just the year part of a date?
so if a user selects 3/10/2009
i want current to equal 3/10/2011
Dim current1 As Date
current1 = TextBox1.Text
current1.Year = Now.Year
Can I change the applicaiton virtual path at the runtime
View 1 RepliesDoes anyone has an idea on how to change the connection string of the webparts at runtime. i have a multitenant app, and would like to store each accounts users settings in their respective DB's i tried changing the connstring in the webpartsmanager init, and the page load event
Dim myConfiguration As System.Configuration.Configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~")
Can we change master page dynamically in ASP.NET ... If yes How?
View 1 RepliesIn my web site in all html pages I call a function in body onLoad event:
<body onLoad="func1();">
This is part of my template for html, so it appears on every page in my site and I can't change that. Now, the deal is that on some pages, I need to call some other functions onload and I tried with window.onload property, but it wipes the calling of func1...
I now that I can just say:
window.onload = func2(); //where func2() calls to func1()
but this seems dirty and lame? Isn't it? So, is there a way to add some functions to those that are about to be executed onload, without deleting the old one?
I'm using the mvc authorize attribute on my controllers. Using forms authentication, I'd like to be able to redirect unauthenticated users to a different loginUrl based on the route or target url. I'm guessing that creating my own authorize atribute isn't the right thing to do because it shouldn't know about the authentication module you are using (Windows/Forms etc). What would be a good way to acheive this?
View 2 RepliesI am working on an ASP.NET web application in Visual Studio 2005. I am using a trace listener to check the values of variables as I test the web application. Every time I publish the web site it overwrites the entire web site so I need to give my log file write permissions for the ASPNET account again. Is there a way to automate this chore as part of the publishing process?
View 1 RepliesI have a formview bound to an entitydatsource and it is working fine. here's the scenario though
If the querystring contains a "memberID" , I have setup an object datasource to fetch the results corresponding to the memberid from the database.
I want the name and email id fields in the formview to default to these values in the objectdatasource. How can you do this?
My issue is that , need to change the column name(following some format) of the gridview (which is binded with XMLTextReader). Without changing directly XML file, Required to change the column name dynamically at runtime .
Performance.xml
<Performance>
<Departments>
<Heading>FS</Heading>
<S0015>1</S0015>
<S0020>2</S0020>
<S0025>5</S0025>
<S0030>5</S0030>
<S0035>6</S0035>
</Departments>
<Departments>
<Heading>BS</Heading>
<S0015>0</S0015>
<S0020>3</S0020>
<S0025>5</S0025>
<S0030>1</S0030>
<S0035>3</S0035>
</Departments>
</Performance>
Heading S0015 S0020 S0025 S0030 S0035
FS 1 2 4 5 6
BS 0 3 5 1 3
Required Format:
Heading 00:15 00:20 00:25 00:30 00:35
FS 1 2 4 5 6
BS 0 3 5 1 3
I tried this link but I wonder is it possible doing the same thing without page refresh?
View 1 RepliesI have four columns in database. Consider it as a,b,c and d. I'm trying to place a and b column values in TO part and c and d column values in CC part in outlook. a,b,c,d contains six digits numeric values. I just need to place a and b columns values in to and c and d values in cc part on click of a button.
View 1 RepliesHow do I need to change the last line of the code to set the parameter and delete the record that is checked. The code I am referencing is the one near the bottom that begins with SQLDataSOurce2.Delete.
The Delete command in asp slq data source is "DELETE FROM Products WHERE ProductId = @ProductId".
DataSource:
[Code]....
VB code:
[Code]....