|
good njoy Cheers!!
Brij
|
|
|
|
|
hello
actually i've developed a asp.net 2.0 multilanguage website by using localization incl. resource files.
now i've got a problem with the following question:
how can search engines detect my multilanguage website-content ?
can they detect the resource-files ?
thanks for any help
cheers
lutz
|
|
|
|
|
Hello Friends,
I've a GridView inside an Update Panel. There is a Select Command inside the GridView as i click on Select Link for a row. It has to fill the labels with the value brought at RowCommand for Select Command but labels are outside of the Update Panel so it's not showing the values in the labels. But if i use PostBack Trigger then it's working fine but taking an postback. So i want to use something for AsynPostBack. So suggest me the way
|
|
|
|
|
Hi there,
I was looking for a chat program, and I found it here in Code Project,
Build a Web based Chat using ASP.NET Ajax (http://www.codeproject.com/KB/ajax/aspnetchat.aspx)
The code is working perfectly,except 2 issues,can anybody tell me how can I overcome these issues?
1-how can I get for example the last 2 hours chat from the database, when a new user enters to the chat room? I tried the getlastmessage stored procedure, but because of the refresh, it keeps showing the messages over and over. any solutions?
2-In firefox after I hit the enter on keyboard I see two messages instead of one. sometimes it happens in IE too.
Thanks in advance
|
|
|
|
|
It'll be better if you put your question in the Article itself. Cheers!!
Brij
|
|
|
|
|
I've already put the question, but still no answer
|
|
|
|
|
Hi
I am using Gridview.In that I used text which is used as template field. I also use label in that template field. Now onchange event of each text box i want to visible my label. Onchange event I am passing text value for some checking. when I display using alert it showing that value. So How can I assign that value to label and show that label.
Because of label in template field I think its not working. I tried with test page without inserting label in itemtemplate gridview it showing exact result what i want that is showing text what I passed on to onchange event of textbox
So How can I Show the text using that label?
Thanks
sjs
|
|
|
|
|
You just need to have client ID of label.
First point, make the label's style.display='none' from server when you dont want ot display it.Pass the client id of the label on onchange event of each text box from server side itself.Now on onchange event you will be having the clientid of associated label just change the style as style.display='' .
Let me know if any query..Cheers!!
Brij
|
|
|
|
|
Hi,
If i passed labels clientid through on onChange event of Text then its not working.
my code is :-
<EditItemTemplate>
<asp:TextBox ID="txtEditPassword" runat="server" TextMode="Password" OnChange="Getlblvalue(this.value,<%=lblpwd.ClientID%>);" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
ControlToValidate="txtEditPassword" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="txtEditPassword" Display="Dynamic" ErrorMessage="*"
ValidationExpression="([0-9,a-z,A-Z,*,@,$,-,+,?,^,_,&,=,!,%,(,),~,£,#,/,]){1,12}"></asp:RegularExpressionValidator>
<asp:Label ID="lblpwd" runat="server" ForeColor="Red" Visible ="true"></asp:Label>
</EditItemTemplate>
and my java script is:
<script language="javascript" type="text/javascript">
function Getlblvalue(str,lblid)
{
alert(lblid);
var gridViewCtlId = '<%=GVUserDataList.ClientID%>';
var grid = document.getElementById(gridViewCtlId);
var gridLength = grid.rows.length;
var sum = 0;
// //calculate sum of the prices looping through the gridview and operation in every cell
// grid.rows[5].cells[5].FindControl('lblpwd').textContent="Hello";
// sum = (grid.rows[5].cells[5].find.textContent);
// alert(grid.rows[5].cells[5].FindControl('lblpwd').textContent);
// //grid.rows[gridLength - 1].cells[5].innerHTML = sum;
}
</script>
Thanks
|
|
|
|
|
You have to attach the OnChange event to textbox at server side in grid's databound event.There you will get the client Id of label using find control.
First find the textbox and label in databound and attach the event like this at server side
txtEditPassword.Attributes.Add("onchange", "Getlblvalue(this.value('" + txtEditPassword.Text+ "','"+ lblpwd.ClientID+"');"); Cheers!!
Brij
|
|
|
|
|
ok Thanks for your help..I will try it..
Thanks Again..
|
|
|
|
|
your most welcome Cheers!!
Brij
|
|
|
|
|
hi
i worked on windows application and now i m working on web application for the first time.
the following is my code in defalut page
Partial Class _Default
Inherits System.Web.UI.Page
Dim i As Integer = 0
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
i = i + 1
MsgBox(i.ToString())
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
i = i * 100
MsgBox(i.ToString())
End Sub
End Class
when i click button1 the value in i is 1.
but when i click button2,it is showing the value in i is 0
but ihave to get 100
can any one tell me whats happening at button2
|
|
|
|
|
First, format your code using the pre tags when posting. You've been around long enough to know this.
Understand that the web, and ASP.NET, is stateless. Each time a page is requested, or an action, such as a button click, causes a postback, all the variables you have declared are set to their default values unless otherwise persisted.
You will do well to pick up a book on ASP.NET and read it before proceeding. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
vijaylumar wrote: Dim i As Integer = 0
you declared i as 0 so you get result as 0
|
|
|
|
|
I need your help but have ideas but do not know how to implement them.
What I want is that the order of how the groups will eventually appear in the gridview are read from the database.
I have 1 to x groups.
In my GridView, the data are displayed with BoundField.
It looks like this.
<a href="http://img1.immage.de/0802377aunbenannt.jpg">http://img1.immage.de/0802377aunbenannt.jpg</a>[<a href="http://img1.immage.de/0802377aunbenannt.jpg" target="_blank" title="New Window">^</a>]
My question is how can sort each row?
|
|
|
|
|
Hi Muc! I am Not quite sure what are you looking for but maybe you need to program the sort event of gridview... something like
protected void GV_MyData_Sorting(object sender, GridViewSortEventArgs e)
{
string sortExpression = e.SortExpression;
if (GridViewSortDirection == SortDirection.Ascending)
{
GridViewSortDirection = SortDirection.Descending;
SortGridView(sortExpression, DESCENDING);
}
else
{
GridViewSortDirection = SortDirection.Ascending;
SortGridView(sortExpression, ASCENDING);
}
}
private void SortGridView(string sortExpression, string direction)
{
DataTable dt = GetDataTableSource()
DataView dv = new DataView(dt);
dv.Sort = sortExpression + direction;
GV_MyData.DataSource = dv;
GV_MyData.DataBind();
}
private const string ASCENDING = " ASC";
private const string DESCENDING = " DESC";
public SortDirection GridViewSortDirection
{
get
{
if (ViewState["sortDirection"] == null)
ViewState["sortDirection"] = SortDirection.Ascending;
return (SortDirection)ViewState["sortDirection"];
}
set { ViewState["sortDirection"] = value; }
} ... it maybe helps a little! good luck! 
|
|
|
|
|
Hi punkIsNotDead, what im askin myself is how i can sort my gridview depending on the rank column in the database?
Its Loos like this
http://img2.immage.de/09028ecclientpic.jpg[^]
When one of the arrows is clicked on, for example Asceding then then the line should high slip. Let's say we click the down arrow for AEC, then its value must be recalculated, which would be called that previous rank_value [2] jumps to 1 And the value of 1 was is then 2 Once everything is to be bound to the GridView.
http://img4.immage.de/09024bd3d3edbpic.jpg[^]
|
|
|
|
|
Hi punkIsNotDead, what im askin myself is how i can sort my gridview depending on the rank column in the database?
Its Loos like this
<a href="http://img2.immage.de/09028ecclientpic.jpg">http://img2.immage.de/09028ecclientpic.jpg</a>[<a href="http://img2.immage.de/09028ecclientpic.jpg" target="_blank" title="New Window">^</a>]
When one of the arrows is clicked on, for example Asceding then then the line should high slip. Let's say we click the down arrow for AEC, then its value must be recalculated, which would be called that previous rank_value [2] jumps to 1 And the value of 1 was is then 2 Once everything is to be bound to the GridView.
<a href="http://img4.immage.de/09024bd3d3edbpic.jpg"></a>
<a href="http://img4.immage.de/09024bd3d3edbpic.jpg">http://img4.immage.de/09024bd3d3edbpic.jpg</a>[<a href="http://img4.immage.de/09024bd3d3edbpic.jpg" target="_blank" title="New Window">^</a>]
|
|
|
|
|
When I browse to select a file using the FileUpload control, the file's full path is displayed in the accompanying textbox but when I try to get at the full path in my code, the path to the file is stripped off automatically and i can't find it. I need to perform different actions depending on what directory the file is from, so i need to get at the path. I seem to run into the same problem with the simple html file input control as well.
It seems like I must be overlooking something very simple. Does anyone know how I can get at the full path?
thanks so much,
Ashu
9818842034ashutosh kumar jha
|
|
|
|
|
I dont think this is actually needed, as the path that you would find from the fileupload control will not be the path to the server, rather it will be a path of the client.
If you still like to use it, all you can see is :
this.myfileUpload.PostedFile.FileName
Or find from
HttpContext.Current.Request.Files
or
<br />
Request.Form["fileuploadControl"]<br />
These are sent from the client. If this doesnt solves the issue, I think the browser is not sending the full path (depends on browser).
|
|
|
|
|
Dear sir,
basically i want to pass a complete local file path in a method which can be post a file in different server(means i want to upload a file on multiple server at a time, thats why i used ftp class in asp.net to upload the file, it is working Fine in Internet Explorer but not work with Mozila).
My Code Function is
public void uploadFileUsingFTP(string CompleteFTPPath, string CompleteLocalPath, string UName, string PWD)
{
//Create a FTP Request Object and Specfiy a Complete Path
FtpWebRequest reqObj = (FtpWebRequest)WebRequest.Create(CompleteFTPPath);
//Call A FileUpload Method of FTP Request Object
reqObj.Method = WebRequestMethods.Ftp.UploadFile;
//If you want to access Resourse Protected You need to give User Name and PWD
reqObj.Credentials = new NetworkCredential(UName, PWD);
//FileStream object read file from Local Drive
FileStream streamObj = File.OpenRead(CompleteLocalPath);
//Store File in Buffer
byte[] buffer = new byte[streamObj.Length + 1];
//Read File from Buffer
streamObj.Read(buffer, 0, buffer.Length);
//Close FileStream Object Set its Value to nothing
streamObj.Close();
//Upload File to ftp://localHost/ set its object to nothing
reqObj.GetRequestStream().Write(buffer, 0, buffer.Length);
}ashutosh kumar jha
|
|
|
|
|
Hey Asutosh,
I think you are missing out the point. From the web site, you can send files only through httpstreams. To invoke FTP from the client side you need client side sandbox apps etc which are capable of invoking Ftp requests to the server.
Other than that, if you are willing to invoke FTP request to the FTP server from the hosting application, you need to upload the files through HTTP, and then you need to send the file to the FTP location, invoking a new FTP session to that server.
Actually one thing you must remember, Server cant request a client to get a file. Even though you send the client full file path to the ftp server, if the client remains idle, server cannot get the file.
I hope this is clear now.
|
|
|
|
|
Hi,
I have a custom paged grid user control on my page. the problem is everytime the last page number is clicked it come out fine but if it is clicked again all the rows of the gridview are displayed irrespective of data and they disappear again when clicked and then reappear if next is pressed .
|
|
|
|
|
Look at this and compare
Paging without a wizard (SqldataSource control) [^]Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|