|
Do a little research. It's not hard to find examples of using the repeater control with templates. Then come back and ask questions if you need help.
only two letters away from being an asset
|
|
|
|
|
Hello,
I have an Asp Repeater and inside it I have only an Asp Label.
I need to set my Label Text as follows:
Private Sub lNews_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles lNews.Init
' Define lNews properties
With lNews
.CssClass = "lNews"
.Text = "Title" & [Title] & "Description" & [Description] *******
End With
End Sub
In ******* I want to load the [Title] and [Description] table fields.
I loaded my database records using an AccessDataSource
My question is:
How to I get the [Title] and [Description] values from my AccessDataSource and place them in lNews.Text?
Thanks,
Miguel
|
|
|
|
|
Templates and DataBinding
only two letters away from being an asset
|
|
|
|
|
<itemtemplate>
<%# DataBinder.Eval(Container.DataItem, "Title")%>
<%# DataBinder.Eval(Container.DataItem, "Description")%>
|
|
|
|
|
Hi All,
I am developing webservice in asp.net 2.0 which must be RPC Style based
which takes input as a xml file.I am just developing default webservice
in Visual Studio 2005 which has webMethod.Is this is RPC STYLE OR Document
style webservice? if No then how build RPC style one.........?
Also How client then made request to this service which must be open on
some port.
Send me some example for RPC STyle Web Service if possible.
Thanks in Advance.
|
|
|
|
|
By default, Visual Studio creates document style web services. This can be a problem if you are calling the web service from a J2EE application becuase J2EE clients expect RPC style services by default. The good news is that it is easy to change the stype of your web service.
1. Add [SoapRpcService()] above your class declaration
2. Remove [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] from your web service class.
Let's look at the default web service visual studio provides when you create a new web services project:
[WebService(Namespace = "http://tempuri.org/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[ToolboxItem(false)]<br />
public class Service1 : System.Web.Services.WebService<br />
{<br />
[WebMethod]<br />
public string HelloWorld()<br />
{<br />
return "Hello World";<br />
}<br />
}
Here is the same web service implemented RPC style
<br />
[WebService(Namespace = "http://tempuri.org/")]<br />
[ToolboxItem(false)]<br />
[SoapRpcService()]<br />
public class Service1 : System.Web.Services.WebService<br />
{<br />
[WebMethod]<br />
public string HelloWorld()<br />
{<br />
return "Hello World";<br />
}<br />
}
|
|
|
|
|
|
Hi Jim,
I have created one RPC Style WebService by including [SoapRpcService()].
Now after launching how to open that webService to particular port,so that
it can able to listen the request from client.
Actualy i have one code snippet
[SoapRpcMethod()]
public string GetData(string request)
{
data.XmlRequest = request;
string response = data.GetData();
return response;
}
This take string as input which is in xml format.After parsing and performing calulation returns a string response which is in same format.
so, my question is how this method listen the request from client? i.e J2EE Client.
Or is there nessesary to open a partucular port for listening client
request?
What things I should do extra for converting it to RPC Based?
Once again...
Thanks in advance.
|
|
|
|
|
Once a web service is deployed, it is always listening, but that is handled by IIS. Web services function very much like web pages. When you type a URL into your browser, a request is made the server for the specififed web page and the web page response with some content. A web service works very much the same way; when IIS receives a request from the client, it passes it on to your web service which then response with the appropriate SOAP response. By default, web services run over port 80, but you can configure IIS to use any port you wish without changing any code.
|
|
|
|
|
Hi,
Last but not list.....................................
How to call RPC WebService through J2EE client through SOAP Request.
|
|
|
|
|
|
Hi All! I want to know how can I change the value of a text box on Page1 from Page2 by clicking on a button on page2 without using querystring,session or posting the form back. It may sound silly but I've seen this happened myself. Even if it is possible through javascript or asp.net
Many thanks
|
|
|
|
|
If one page is a popup window then it is possible with javascript.
opener.window.document.getElementById('yourTextboxID').value = 'yourValue'
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Yah! You are right, It works.
Thanks
|
|
|
|
|
Nitin1981 wrote: without using querystring,session or posting the form back. It may sound silly but I've seen this happened myself
I'd like to see an example of this, especially the no postback option
only two letters away from being an asset
|
|
|
|
|
Solution is right here given by Tod.
Regards
Nitin
|
|
|
|
|
You didn't mention popup in your original question.
only two letters away from being an asset
|
|
|
|
|
What you need is a reference to the window of the page that you want to access.
If Page2 is a window opened by Page1 , you get a reference to the window containing Page2 as the return value of the call to the window.open method. You get a reference to Page1 by using window.opener .
Let's say that the variable win contains a reference to the window, then you can access the document property of the window, and use that to access it's content. Example:
win.document.getElementById('SomeControl').value = 'Hello world!';
In some cases it might not work well to directly access elements of a different page. Then you can call a function in the page that accesses the element:
win.document.someFunction('Hello world!');
function someFunction(text) {
document.getElementById('SomeControl').value = text;
}
---
b { font-weight: normal; }
|
|
|
|
|
Is there any inbuild library for emails sending in ASP.net 2.0 as was there in Classic ASP
Regards
|
|
|
|
|
|
Hello
I need a Help from the developers ......
i need to do a thing which look like simple but i can't find the way to do that .. so please update me if anyone knows this.
i am using a variable which store the name of the control as u can say :
string storecontrol = "textbox1";
and i need a method so that i can give only
storecontrol.text
and access the text in the corresponding textbox...as
console.WriteLine(storecontrol.Text);
and it will print the value of the textbox1.Text
If anyone knows this , then reply it..
Dotnetjunkie.....
|
|
|
|
|
If you know the parent of the control, you can use the FindControl method to locate the control.
---
b { font-weight: normal; }
|
|
|
|
|
If you can't use findparent, you could use reflection [assuming you are working in code behind]:
public void foo()
{
string TextBoxName ="txtBar";
TextBox requiredBox = GetBoxByName(TextBoxName);
requiredBox.Text = "New Value";
}
protected TextBox GetBoxByName(string name)
{
Type t = this.GetType();
FieldInfo fi = t.GetField(name);
return fi.GetValue(this) as TextBox;
}
I've not tested this properly, so don't be surprised if it doesn't work. If you want to specify which property you want (in your example .Text) you could create a GetProperty method running along the lines of "GetBoxByName" which uses reflection to find the property you want.
|
|
|
|
|
hi
i have an array which contain some values .i want to pass this array to javascript function from codebehind file.How to do this?
thanks
vijay
|
|
|
|
|
You can't do that.
What you can do is to create Javascript code that will recreate the array. For an example an array of integers:
int[] values = new int[] { 1, 2, 3, 4 };
StringBuilder code = new StringBuilder();
bool first = true;
foreach (int v in values) {
code.Append(first ? "var values = [" : ", ");
first = false;
code.Append(v);
}
code.Append("];");
Page.ClientScript.RegisterStartupScript(this.GetType(), "ValuesArray", code.ToString(), true);
---
b { font-weight: normal; }
|
|
|
|