|
Hi experts,
Is there a possible way to set filter options like in .net ".rpt" or any file extension?
Thanks in Advance ^^
|
|
|
|
|
There is no way to set the filter when selecting file. You can check the file extension on server side and inform about unsupported file types.
|
|
|
|
|
What is your preferred implementation for AJAX modal popups?
I think that the Netflix implementation is pretty standard.
Does .NET provide a good AJAX popup implementation out of the box or do you tend to use third party controls for this instead?
|
|
|
|
|
|
I'm using ASP.NET 2.0, Visual Studio 2005, AJAX, C#.
I have a search results page that lists out products that a user is searching for inside the Repeater control. I have an image inside every product that when a user clicks on it I need to query the database to get the data. All the samples I have found show code with the panel already populated with data. I want to do it on demand. I've attempted to use the DropDownExtender, HoverMenuExtender and PopupControlExtender with no luck.
|
|
|
|
|
Hi,
I have this popup page where i am doing this in the button click:
Response.Write("<script language='javascript'>function changeParent(){window.opener.document.getElementById('ctl00$ContentPlaceHolder1$txtChange').value='Change';}window.close();</script>");
In the parent form I have a hidden textbox set to autopostback=true and in the textchanged event handler, I am doing response.redirect(url).
In the script above(in the popup), I am changing the value of the textbox located in the parent page.
So, I was expecting it to work, but its not.
Any idea?
Thanks.
|
|
|
|
|
You can call the function __doPostback event in the parent window. Take a look at the parent's source and see what script the hidden field is invoking (in case it's not the default __doPostback). Add that code to your popup window script.
|
|
|
|
|
I've found this in the parent's source:
onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$txtChange\',\'\')', 0)"
But what would be the syntax to call this from the popup window script? Do I call it after changing the value? like:
Response.Write("<script language='javascript'>function changeParent(){window.opener.document.getElementById('ctl00$ContentPlaceHolder1$txtChange').value='Change';<br />
__doPostBack(\'ctl00$ContentPlaceHolder1$txtChange\',\'\')', 0);<br />
}window.close();</script>");<br />
Thanks.
|
|
|
|
|
Put a client side javascript function call in the onchange event of your field in the parent window. That should fire when your popup changes the field. You can force the postback in that function.
|
|
|
|
|
Hi guys i am adding many dynamic LinkButton inside a table cell. What i want to do is if the row gets full move the move the next LinkButton to underneath the current row. and each LinkButton should have background colour.
I am thinking of nested tables but how can move the LinkButton to the next row if the top one get fills up.
Thanks in advance
|
|
|
|
|
Just set the width of whatever element you adding the buttons and they will move down underneath.
If you are talking about an HTML Table you can not tell when a row is "full".
I didn't get any requirements for the signature
|
|
|
|
|
Hi Guys,
I've got a function in each of my webpages for generating a link to that page with the approriate QS arguments. However, when i deploy the app, the query strings are broken.
I'm using the following:
<br />
public static string GetLink(string search)<br />
{<br />
Uri pathUri = new Uri(HttpContext.Current.Request.Url, string.Format("/Secure/SearchResults.aspx?{0}={1}", QS_SEARCH_TERMS, HttpContext.Current.Server.UrlEncode(search)));<br />
<br />
return pathUri.ToString();<br />
}<br />
This works fine local host (cassini - http://localhost:000001/), but when i deploy it to my test enviroment, i have a different root URL - http://server/appname/.
When i run my code, the appname part of the URL is dropped from the concatenation process, and i get resource not found - http://server/resource/.
Any ideas what i have to change to make this work?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Try Uri pathUri = new Uri(HttpContext.Current.Request.Url, string.Format("~/Secure/SearchResults.aspx?{0}={1}", QS_SEARCH_TERMS, HttpContext.Current.Server.UrlEncode(search)));
I didn't get any requirements for the signature
|
|
|
|
|
Hi Todd,
I had origionally tried this, but the tilde is just added to the path, rather than being replaced, and i end up with:
http://localhost:00001/~/Secure/SearchResults?search=aaaa
Additionally, if i were to remove the ~/ and just use 'Secure/SearchResults?search=aaaa' for the second part of the URI, then the entire directory structure is used, which also results in the resource not being found.
i.e.
new Uri("http://localhost:00001/Project/Secure", "Secure/SearchResults?search=aaaa");
i get:
http://localhost:00001/Project/Secure/Secure/SearchResults?search=aaaa
As i am trying to generate links in a master page, this is increadiably frustrating as it is used in multiple sub directories, which causes the links to be generated differently.
Any further ideas?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Friday, January 16, 2009 4:59 AM
|
|
|
|
|
try Page.ResolveUrl ("~/...")
I didn't get any requirements for the signature
|
|
|
|
|
Hi Todd,
I was not in the context of the page when running this block of code, however i have found a solution.
<br />
public static string GetLink(string search, int searchStart)<br />
{<br />
string path = VirtualPathUtility.ToAbsolute("~/Secure/SearchResults.aspx");<br />
<br />
return string.Format("{0}?{1}={2}&{3}={4}", path, QS_SEARCH_START, searchStart, QS_SEARCH_TERMS, HttpContext.Current.Server.UrlEncode(search));<br />
}<br />
While this didn't generate the complete URL, it did provide me with one that works from any location in the application.
Thanks for taking the time to reply
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
i have a grid view on which i m doing insert ,delete,edit operations.
i have created stored procedures for them in sql server 2005.
i created buttons for edit and delete in each row of gridview.
i am only using "rowcommand" event for editing and deleting operation.
on edit button click i want to insert cell values of row into textboxes in my webform outside gridview.
i have edit button outside on clicking which it enters textbox value in grid view..
HOW CAN I ACHIEVE THIS?
mihirkul vikram
|
|
|
|
|
protected void EditButton_Click(object sender, EventArgs e)
{
LinkButton EditButton = (LinkButton)sender;
GridViewRow gvrObject = (GridViewRow)EditButton.NamingContainer;
Textbox tb = (Textbox)gvrObject.FindControl("tb"); //Must be a template column
this.yourTextBoxOutsideOfGrid.Text = tb.Text;
}
|
|
|
|
|
Hi!
I have a problem with my website. I'm using UpdatePanel and i update it's content using a timer.
On local server everything is fine but when i upload it on the server on every update i get this error:
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '
<!DOCTYPE html P'.
- No Response.Write();
- No Response filters
- No HttpModules
- No Server trace
- No Server.Transfer();
Please help me....
--------------------------------
visit: http://pmartike.deviantart.com/
|
|
|
|
|
|
Hi all
I have created one procedure:
CREATE PROCEDURE [dbo].[dynamic_insert](@table varchar(50),@parameter nvarchar(4000))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
set @opration='insert into '+@table+'(+@testTable+) values(+ @parameter +)'
end
My front end code is:
com.Parameters("@table").Value = "order1"
com.Parameters.Add("@parameter", SqlDbType.NVarChar)
com.Parameters("@parameter").Value = c2.cust_id & "," & c2.item_id & "," & c2.cust_items & "," & c2.item_name
c2 is my class object.
My problem is:when i assign values in parameter field,it takes as string.
So data is not inserted.
example: c2.cust_id = 1
c2.item_id = 1
c2.cust_items = "cd"
c2.item_name = "pen"
com.Parameters("@parameter").Value ="1,1,cd,pen"
It's not possible to insert string.
what i do?is there any another datatype? or another way?
Thanks
monika
|
|
|
|
|
I have created one procedure:
CREATE PROCEDURE [dbo].[dynamic_insert](@table varchar(50),@parameter nvarchar(4000))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SET @opration='insert into '+@table+'(+@testTable+) values(+ @parameter +)'
END My front end code is:
com.Parameters("@table").Value = "order1"
com.Parameters.Add("@parameter", SqlDbType.NVarChar)
com.Parameters("@parameter").Value = c2.cust_id & "," & c2.item_id & "," & c2.cust_items & "," & c2.item_name c2 is my class object.
My problem is when I assign values in parameter field, it takes as string.
So data is not inserted.
example:
c2.cust_id = 1
c2.item_id = 1
c2.cust_items = "cd"
c2.item_name = "pen"
com.Parameters("@parameter").Value ="1,1,cd,pen" It's not possible to insert string.
what i do? is there any another datatype? or another way?
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
You can't execute dynamic SQL like this. I believe you would need to call the "EXEC" function on the generated SQL. What is the actual SQL statement you want executed? Where does the @testTable parameter come from?
Why are you not just creating a single stored procedure to handle inserts into the table and simply calling that, passing the appropriate parameters as discrete values?
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
dropdown list, something not right in my code, say for i'm trying to view movies for thrus, but wed page is showing up when I click on thrusday dropdown
here my code behind
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
'Dim ds As DataTable
'ds = GridView1.DataSource
'GridView1.DataSource = ds
PopulateGrid(Convert.ToDateTime(DropDownList1.SelectedValue.ToString()))
|
|
|
|
|
First, please use the <pre> tags for code blocks (using the "code block" formatting option).
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
'Dim ds As DataTable
'ds = GridView1.DataSource
'GridView1.DataSource = ds
PopulateGrid(Convert.ToDateTime(DropDownList1.SelectedValue.ToString())) Is this the complete method? It looks like it might be missing stuff.
Anyway, what does your drop down list of values look like? Remember, VB collections/arrays start counting at 1 not 0 and from your description it sounds like you are off by one on your indexing.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|