|
How can I add a javascript code and call it from the c# code in a web user control?
I am trying to open a new browser window when a button is clicked but i have to do some processing in the event handler then open the new window.Is there a way to do it?
Mohamed El Gohary
|
|
|
|
|
Use the RegisterClientScript method to add the code to the page.
---
b { font-weight: normal; }
|
|
|
|
|
But this only works with WebPartManager control. Are you sure this is the only way?
Mohamed El Gohary
|
|
|
|
|
What does only work with the WebPartManager control?
---
b { font-weight: normal; }
|
|
|
|
|
How to call acrobat dll in asp.net?Can any please send me the code using CSharp?
Scenario.
In my web form i have 2 Link buttons . If i click one of the link the pdf file should be loaded into our web form (I want to access the methods and properties of acrobat dll inside asp.net web form using CSharp) ?
Thanx in advance
|
|
|
|
|
I want to create a site using asp.net which enable people to vote for their fav idols. (SQL database will be used)
To be honest, I am looking for a all done codes so that i can focus on the other parts of the project.
Hope you guys can help me. Thanks Alot ....
|
|
|
|
|
any ideas about how to count number of words found when using the full-text search feature in sql server 2005 and high-light these words when i bind the search result on my web page...i'm using ASP .NET 2.0
Thanks in advance
Yasser Salama(MCP)
|
|
|
|
|
Hello All,
I am stuck with one problem. I am having one asp.net application in .net framework 2.0 and there is one link to open share point portal. I don't want to get login screen in share point when my user click the link from my asp.net application as he is already get login to my application.
Please help me ASAP.
Thanks,
Ritesh Shah
------------
ritesh4web@gmail.com
|
|
|
|
|
Hi Everyone,
Please help me ASAP as This matter is urgent to me.
Thanks,
Ritesh Shah
Ritesh Shah
------------
ritesh4web@gmail.com
|
|
|
|
|
I have a couple of questions, I am developing a small application Kiosk Style the UI will be controlled by Touch Sceen only. My question is
1. how do i make the browser full screen? No title bar, no status, I would like the only function to be those presented by the application (asp.net, C#).
2. Can I use flash to be the front end and use ASP.NET (c#) as my language?
3. I am going to run this with stored procedures with SQL server 2000. Should my insert functions be stored procedures. there is a possibility that up to 10 stations (kiosk) could theoretically run at the exact same time.
Thanks this forum is a life saver.
|
|
|
|
|
I'm sure this will be embarrassingly simple.
I have web pages that are a fixed width (800 px). I'm using masterpage/content.
How do I make the masterpage and content center in the browser window?
A= Image from master page
B= page content
-----------------------------------------------------
| | A | |
| |
| | B | |
| | | |
| | | |
| | | |
-----------------------------------------------------
Everyone else's job looks easy
|
|
|
|
|
can i get help on wat this line does
response.redirect("login.asp?l=incorrect_login_or_password")
i understand the redirect part but wat is this " l=incorrect_login_or_password"
can anyone help me this....will be very greatefull....
thank you..
|
|
|
|
|
That is a query string. It's very common for sending information to a page.
In the page the value "incorrect_login_or_password" can be picked up using Request.QueryString("l").
---
b { font-weight: normal; }
-- modified at 16:08 Saturday 24th June, 2006
|
|
|
|
|
thanks alot for the help...
|
|
|
|
|
hi all,
In my table i have two columns named FromDate and ToDate. I have to
find the each and every date in that range and display them in a datagrid.
Let us take
from date: 06/10/2006 (mm/dd/yy)
To Date: 06/15/2006
output should be like this( in datagrid)
check box 06/10/2006
check box 06/11/2006
check box 06/12/2006
check box 06/13/2006
....
check box 06/15/2006
can anybody help me how to do it
Thanx in advance..
your
peter
|
|
|
|
|
You simply read the from, to date values from the two columns in the table to the variables, then build a custom date list and bind it to the datagrid control. The sample code looks something like:
DateTime from = ...;
DateTime to = ...;
List<DateTime> list = new List<DateTime>();
for(DateTime date = from; date < to; date=date.AddDays(1))
{
list.Add(date);
}
gridDate.DataSource = list;
gridDate.DataBind();
In case you use the ASP.NET 1.1, you can replace the generic List class with the ArrayList or a custom DateTime collection object.
|
|
|
|
|
hi
i wnt to make the website template in asp.net,tell me how can i make it ,if i make it in macromedia dremweaver thn hw can i embed it in my asp.net page..
mean i wnt to use this template in my whole website.jst i embed it ,,tell the procedure or the way i can make it..
waiting for ur rply
|
|
|
|
|
How to create shortcut for homepage in web application or add in favorites Menu
parthiban
|
|
|
|
|
You need to create an Internet Shortcut[^] to the home page, and you can save it in the Favourite or Desktop special folder.
|
|
|
|
|
create an HTML file put
Save the Html with a Lovely name "ShortCut to your proj name"
Add a special folder->User's Desktop->Paste the above HTML file
Build setup
------------------------------------------
Boss asked me to Develop in "Java" or "Better"
So Developed in .NET
|
|
|
|
|
Dear Sir,
Why all page (.aspx) after compile contain only the string below
"This is a marker file generated by the precompilation tool, and should not be deleted!"
Why it don't like asp.net 1.1?
How to make those file allow I edit html tag and upload the only changed aspx file.
And how to set IIS.
Thank You.
|
|
|
|
|
When you publish the web site you choose whether the web site should be updateable or not. If you don't make it updateable, the pages will be marker files and the actual pages will be created by code.
---
b { font-weight: normal; }
|
|
|
|
|
hi all..
i have the dropdownlist in formview in EditItemTemplate and have the sqldatasource of both(dropdownlsit and FormView) is different.i want to update and insert the detail of person along with dropdownlist selecteditem through inline coding. i did specified the commands (insert, update, select, delete ) in configuration mode. and there is another dropdownlist in formview whose collection are fixed.
pls if you have any democode using inline coding pls send as soon.
Regards,
srinandan mall
|
|
|
|
|
Below is a quick example to demonstrate what you might want to do with the Northwind database.
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ProductID" DataSourceID="SqlDataSource1"
DefaultMode="Edit">
<EditItemTemplate>
ProductID:
<asp:Label ID="ProductIDLabel1" runat="server" Text='<%# Eval("ProductID") %>'></asp:Label><br />
Category:
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2"
DataTextField="CategoryName" DataValueField="CategoryID" SelectedValue='<%# Bind("CategoryID") %>'>
</asp:DropDownList><br />
ProductName:
<asp:TextBox ID="ProductNameTextBox" runat="server" Text='<%# Bind("ProductName") %>'></asp:TextBox><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update"></asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:LinkButton>
</EditItemTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [ProductID], [CategoryID], [ProductName] FROM [Products]"
UpdateCommand="UPDATE [Products] SET [CategoryID] = @CategoryID, [ProductName] = @ProductName WHERE [ProductID] = @ProductID">
<UpdateParameters>
<asp:Parameter Name="CategoryID" Type="Int32" />
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductID" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
|
|
|
|
|
hi;
i hv problem i hv datagrid in datagrid there is a dropdownlist this list is
dynamically populated thorogh database..i wnt to validat the item in the datagrid throgh javascript function..i pick the dynamic generated IDs of dropdwonlist..how can i call the javascript function from my code
or see below either i m correctly calling the javascript function
Public Function test(ByVal send As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim dl As DropDownList = e.Item.FindControl("DropDownList1")
Dim str As String = "valfunc(" + dl.ClientID.ToString + ")"
dl.Attributes.Add("onChange", str)
End If
End Function }
And here is the code which will be there in html section:
"asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 248px; POSITION: absolute; TOP: 144px"
runat="server" Width="464px" Height="80px" "OnItemDataBound="test"
" Columns>
" asp:TemplateColumn>
" ItemTemplate>
" asp:DropDownList ID="ddl" Runat="server">
" asp:ListItem>oooo
" asp:ListItem>aaa
" asp:ListItem>bbb
" /asp:DropDownList>
" /ItemTemplate>
" /asp:TemplateColumn>
" /Columns>
" /asp:DataGrid>
And this is the javascript function for validation:
"script language=javascript>
function ValFunc(ss)
{
alert(ss.value);
return false;
}
" /script>
the error is the OnItemDataBound="test" the function test is in my vb.net code..this function is nt call..or tell me either i m correct to whn i m calling Javascritp function form my vb.net code here is the code snippoet Dim str As String = "valfunc(" + dl.ClientID.ToString + ")"
the valfunc is the javascript funciton
waiting for reply
-- modified at 2:51 Saturday 24th June, 2006
|
|
|
|