|
what do you mean by "drag & drop" ?
there are plenty of examples of Javascript and DHTML for this
only two letters away from being an asset
|
|
|
|
|
<asp:sqldatasource id="dsBorrowers" runat="server"
="" selectcommand="SELECT * FROM [BORROWERS]" connectionstring="<%$ ConnectionStrings:OxfordLibrary %>">
From this code I can bind data on Page_Load event
I want to bind data on Button_Click event using a SqlDataSource
Thanks in Advance
Sarfarj Ahmed
|
|
|
|
|
Maybe I'm missing something, but just copy the code from Page_Load to the click event handler.
|
|
|
|
|
In my application i need to keep "tip of the day".i have a table with a list of tips. I need to display one of the tips from database table on to the web page and it has to change every day(increment).But Same tip is coming if i'm using "Application"
Please help to solve this problem.
|
|
|
|
|
Well it's quite obvious that you also need to store the index of the last row accessed. if it is global to your application, then You can use an application level variable, otherwise use a cookie for each user.
int x = (int)Application["tip_num"];
DataRow tip = ((Datatable)Application["tips"]).Rows[x];
only two letters away from being an asset
|
|
|
|
|
Can we assign .aspx page (contains only image) to an Image URL which is in another page?
Can it work after deployment?
Regards,
Jai Shankar
|
|
|
|
|
jaishankar2704 wrote: Can we assign .aspx page (contains only image) to an Image URL which is in another page?
Yes, if your ASPX page is configured to return a binary stream representing the image instead of HTML text.
jaishankar2704 wrote: Can it work after deployment?
Yes, if you deploy it correctly.
Paul Marfleet
|
|
|
|
|
function trim(s)
{
return rtrim(ltrim(s));
}
function ltrim(s)
{
var l=0;
while(l < s.length && s[l] == ' ')
{
l++;
}
return s = s.substring(l, s.length);
}
function rtrim(s)
{
var r=s.length -1;
while(r > 0 && s[r] == ' ')
{ r-=1; }
return s.substring(0, r+1);
}
what's the meaning of return s = s.substring(l, s.length);
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote
what's the meaning of return s = s.substring(l, s.length);
It takes s.length chars from the string s starting at position l and stores it in a variable called s and return s it to the calling function.
I learnt that from a book.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
http://www.codeproject.com/script/comments/forums.asp?msg=2295421&forumid=1645#xx2295421xx
Have you seen how greately u're being regarded in the Suggestions Forum
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hi,
I want to get the client hostname or ip address using asp.net.
I have tried the following methods...
Request.UserHostName - returns proxy ip address
Request.UserHostAddress - returns proxy ip address
Request.ServerVariables["REMOTE_ADDR"] - returns proxy ip address
Request.ServerVariables["HTTP_X_FORWARDED_FOR"] - returns empty.
I could not get the actual ip address of the client machine.
Can any one help...how to get the actual client ip address?
Thanks in advance.
Ram
|
|
|
|
|
Try this:
string hostName= System.Net.Dns.GetHostName()
string ipAddress = System.Net.Dns.GetHostAddresses(hostName)(0).ToString()
Felipe
|
|
|
|
|
Hi All, I tried to open a new IE window from C# code and it works for any sample website. However, the same code doesnt work for ajax enabled website. I have removed ajax by deleting
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
from .aspx but still it doesnt work, any clues ??? Do i need to remove something more than that ?
Here is my code for opening the new window that works on pages other than my website page:
string strQS = "http://www.yahoo.com";
StringBuilder strScript = new StringBuilder();
strScript.Append("<script language=JavaScript>");
strScript.Append("window.open('" + strQS + "', \"\",\"height=100,width=400,left=0,top=0,toolbar=no,menubar=no\");");
strScript.Append("</script>");
ClientScript.RegisterClientScriptBlock(this.GetType(), "subscribescript", strScript.ToString());
I would appreciate your help. Thanks
Knowledge is knowing a tomato is a fruit. Wisdom is not putting it in a fruit salad.
|
|
|
|
|
First, you can't open a new windOw using C#. you are using C# to inject Javascript that Will open a new window.
where are you calling this code? Are you trying to hare this script called when the page is rendered on the client?
only two letters away from being an asset
|
|
|
|
|
This code is called on my grid view event , I want to open a new window on grid event. But on this page where this code is not working, it is not working for any control , be it simple button click , and on other pages, it is working on same events, I wonder whats so special in this page , I thought it must be ajax creating problem but now i have removed its reference from the page with same result happening.
|
|
|
|
|
using a script library would be a better approach.
are you sure the grid event is being called? check the function name. Is it a typo?
only two letters away from being an asset
|
|
|
|
|
on first aspx form i have gridview where i must select one row and show that row on the other aspx form . Thanx
|
|
|
|
|
|
I use this VB.NET code in my webproject to export a datatable to an Excel file. The characters é,ä, ... are shown in the Access database, I fill the datatable with the content of a table from the database and export it to Excel. In Excel é, ä, ... are replaced with strange characters... Does anyone know why this happens?
Inherits System.Web.UI.Page
Dim oConn As clsRoot
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oLog As New clsLog(clsLog.LogLevel.Warning, Server.MapPath("log/contacten.log"))
oConn = New clsRoot(Server.MapPath("link/contacten.udl"), oLog)
oConn.Open()
Dim dt As DataTable = oConn.getContacten()
Response.ContentType = "application/ms-excel"
Response.AddHeader("Content-Disposition", "inline;filename=contacten.xls")
Response.Write(ConvertDtToTDF(dt))
End Sub
'Converts a DataTable to Tab Delimited Format
Private Function ConvertDtToTDF(ByVal dt As DataTable) As String
Dim dr As DataRow, ary() As Object, i As Integer
Dim iCol As Integer
'Output Column Headers
For iCol = 0 To dt.Columns.Count - 1
Response.Write(dt.Columns(iCol).ToString & vbTab)
Next
Response.Write(vbCrLf)
'Output Data
For Each dr In dt.Rows
ary = dr.ItemArray
For i = 0 To UBound(ary)
Response.Write(ary(i).ToString & vbTab)
Next
Response.Write(vbCrLf)
Next
End Function
|
|
|
|
|
hai all,
In my project,I have developed an application using ajax anabled website..
When i place the Gridview Control inside update panel.. Paging is not
working..i.e ..in first page alone it is displaying the paging..when i go to
some other page(like 2 nd or 3 rd page).. the paging is not working..its
visibility becomes false...the script manager property is placed in the
master page.. how can i overcome this issue???? please help... thanks in
advance....
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
Have you set UpdateMode="conditional" to the update panel
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
No i didnt do that..should i have to set that condition
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
ya i tried that by stting update mode="conditional".. but still i am getting the same problem
with Regards,
Imthiyas Ahamed.A
|
|
|
|
|
Try this Code:
Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging
GridView1.PageIndex = e.NewPageIndex
fillgrid()//call the fillgrid() function.
End Sub
God is always with you.
|
|
|
|
|
hi in my application i aam using two dropdownlists.
in pageload i pass values for first dropdown and select index of the first dropdown i display second dropdown values.
but without refreshing the page how can i get values into second dropdown.
regards
venkat
|
|
|
|