|
Hi
I guess there is a problem in your query string in ToGrid() function.
You are taking inner join of Customer and Paymethod but specifying join condition as Customers.UserID = Orders.UserID .I guess it should be something like Customers.UserID = Paymethod.UserID.
I hope it'll work fine.
Irshad
|
|
|
|
|
Wow, I guess that you are coming from the world of the classic ASP, but like Irshad said you might want to double check SQL query syntax. You should use the ASP.NET coding model to develop a web page to make your code clearer, it looks like jam currently.
|
|
|
|
|
Hi,
I'm retrieving data from a database and need to display it in labels within a repeater. I do this using:
<code><asp:Label ID="Label1" runat="server" CssClass=".bold" Text='<%# DataBinder.Eval(Container.DataItem, "staff_Firstname") %>'></asp:Label></code>
However in some situations i need to display 2 or 3 fields of data in one label eg Firstname and Lastname. I tried the following:
<code><asp:Label ID="Label1" runat="server" CssClass=".bold" Text='<%# DataBinder.Eval(Container.DataItem, "staff_Firstname") %> <%# DataBinder.Eval(Container.DataItem, "staff_Lastname") %>'></asp:Label></code>
However this returns errors. I know this is possible to achieve as ive done it in the past but cannot remember how as its been a long time since i last used .Net.
Any help would be appreciated.
Thanks!
|
|
|
|
|
Yes you can do that check the following code.
<ASP:Label ID="lblBindAllData" Text='<%#DataBinder.Eval(Container.DataItem, "FirstName").ToString()+","+DataBinder.Eval(Container.DataItem, "LastName").ToString()+","+DataBinder.Eval(Container.DataItem, "Address1").ToString()+","+DataBinder.Eval(Container.DataItem, "Address2").ToString()+" "+DataBinder.Eval(Container.DataItem, "ZipCode").ToString() %>' Visible=true runat="server" />
Hope this will solve your problem.
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
|
What Is Hash Tables In ASP.NET??? plz help
Regards:
Geetika Munjal
|
|
|
|
|
|
In few words a Hash table is a vector where the index is not necessary to be a number, could be a string
hashTable["bob"]
hashTable["peter"]
keep Learning and you never will be out of date...
|
|
|
|
|
Hi friends,
Am having a WebForm in which the user enters all his details and it gets stored in the database.
I want the phone numbers to be stored only as numbers excluding any special characters like '(',')','-' etc...
Is there any generic method eliminate all special characters that an user enters in the textbox?
Or any alternate method?
Also please tell me how to use the "Data Formatting Expression" in datagrid to display the data in required format.
Please help me....
-- modified at 5:47 Wednesday 20th September, 2006
|
|
|
|
|
Vsree wrote: Is there any generic method eliminate all special characters that an user enters in the textbox?
See the RegularExpressionValidator in MSDN, also you can find some sample expressions that can be used with the validator from the link[^].
Vsree wrote: Also please tell me how to use the "Data Formatting Expression" in datagrid to display the data in required format.
Numeric Format [^]
|
|
|
|
|
hi everybody
today i come here with a new doubt;
in one registration form, i have used a html filefield control to browse an photograph of the user and i have converted this image into binary and stored inthe database. but after that i need to retrieve that binary data and dispaly that in an imagecontrol in the next form. anybody know any method to assign this binary data to the image control.
please share some ideas. thanks in advance.
sebastian
|
|
|
|
|
You can create another apx page and in the page load of this new aspx you can write this.
byte[] image = null;
image =(byte[])objDV[0]["imgImage1"];// Taking it from dataview/dataset/dtable
Response.ContentType = objDV[0]["strImage1ContentType"].ToString();
Response.BinaryWrite(image);
Assume this new aspx page name is ImageLoad.aspx
In your page where you are taking an Image control, call the method from aspx
page.
<asp:image id="imgLogo" runat="server" imageurl="<%#GetLogoURL(DataBinder.Eval(Container.DataItem,"intId"))%>" alternatetext="Dynamic Image">
and in code behind you will have
protected string GetLogoURL(object objLogo)
{
return "ImgLoad.aspx"
}
Let me know if this worked for you.
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
|
|
How can I show popup message when session time out in ASP.NET 2.0 ?
The following code show message about Session Expire. My main problem is how to detect session time out.
Dim str As String = "<script language='javascript'>" + "alert(Session has Expire')" + "</script>"
Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopupScript", str)
Best Regards...
|
|
|
|
|
You can use the Session_Start event to detect the session time out, but basically this event also gets fired when the user first visits the web site, so you need a further step to check the authentication ticket to see if he is a logged-in user. You can search the forum for the sample code.
|
|
|
|
|
I try to build a custom control. In the control, it has a collection of X custom control, while there is a ITemplate in X in which contains other controls. For example,
<cc1:Custom>
<cc1:X>
<content>
<asp:TextBox id="a" runat="server">
<asp:TextBox id="b" runat="server">
</content>
</cc1:X>
<cc1:X><content></content</cc1:X>
</cc1:Custom>
The problem is I cann't access the "a" and "b" control directly from the code behind. I have to call FindControl () which it makes my code looks stupid (while you have a ten control to call). And i think it has a more ellegent way so i can call the control directly from the code behind.
Please help me !!!!
|
|
|
|
|
IMO, you still need to use the FindControl method to get reference to the TexBoxes declared in the template, and you can expose them as a public property in the X custom control so that you can directly use them in code-behind.
|
|
|
|
|
Then why when i using a Atlas UpdatePanel inside my custom control, i can access the nested control directly. For example
<cc1:custom>
<cc1:X>
<content>
<atlas:UpdatePanel>
<contenttemplate>
<asp:textbox id="a">
</contenttemplate>
</atlas:UpdatePanel>
</content>
</cc1:X>
</cc1:custom>
With the help of atlas, this time i can access "a" from code-behind. So i think it should have a way to populate nested controls in design mode.
-- modified at 7:31 Thursday 21st September, 2006
|
|
|
|
|
Sorry, but couldn't see your sample code.
|
|
|
|
|
Opp. the HTML-like tag just hits me again. Anywhere, I just found a great solution. Instead of using ITemplate for the "content" propertis, I just use a "Placeholder". And then everything just work great !!!!
|
|
|
|
|
Hi,
I'm trying to access client side innerhtml code from server side on postback.
How do I do it.
I've tried putting a div server tag around the code i need, and then saying divContent.innerhtml, but it doesn't work. Any suggestions?
Thanx
Regards,
Tintin
|
|
|
|
|
Hello...
You can put a and make the | runat=server and put all your client code in that | .
Eg :-
In code behind adding this
TbMain.InnerText.ToString()
You will get the complete table block from the | i.e
Let me knw, if you r looking for something else will try to help you out.
"Walking on water and developing Software on a specification is easy, if
both are frozen..."
|
|
|
|
|
|
No, .innerhtml doesn't seem to work. I've tried it with a
no success.
However, putting in a hidden server field, and getting the innerhtml from the div in javascript works, BUT I get an "UNKNOWN ERROR" popup-window when trying to set the hid1.value = div's inner html!
I tried setting .value = 'test'; WORKS FINE
Why is that
'''''heres some code''''
var strHTML = "";
strHTML = document.getElementById('<%=divTables.ClientID%
').innerHTML.toString();
alert(strHTML); //just a test
document.getElementById('<%=hid1.ClientID%>').value = strHTML.toString();
//then it breaks.
but if its a different string, it works
please help
Regards,
Tintin
|
|
|
|
|
Hi all
I am trying to insert data into Ms-Assess DB it is working Fine in Local
System But not in server
It is giving Error as
"Operation must use an updateable query."
I given all the file permissions but still it is giving same error
Plz can any ine help it is urgent
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|