2 input textbox & 1 output textbox
I have to generate end ip address depend on No. of static ip & start ip address
e.g
No of static ip=5
Start ip =192.168.10.10
then generate output as
end ip = 192.168.10.14
my aspx code is as following
********************************************************************************************
| : | ||
| : | ID="RegularExpressionValidator6" runat="server" ErrorMessage="Invalid IP !" ControlToValidate="txtStartIP"> | |
| : | ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid IP !" ControlToValidate="txtEnd_IP"> |
******************************************************************
so please help me in coding part because I just started Programming & new in programming

Guest UserRank #259 · 9.8K reputationPosted Aug 9, 2014, 11:13 PM EDT
Guest UserRank #259 · 9.8K reputationPosted Aug 7, 2014, 5:07 PM EDT
For this requirement you need to right algorithm which will read via octect. IP adderss is divided in range from 0-255 in each octet. Suppose user enters in text box find
Example1
192.168.1.250 and static IPs: 10, so the output should be
192.168.2.5 -> txtEnd_ip
If you agree to this, please mark this "Acccepted" answer and then we shall proceed in writing logic to solve Example1
Guest UserRank #259 · 9.8K reputationPosted Aug 8, 2014, 9:37 PM EDT
Looking forward for interaction future...
Sanket JainRank #1,789 · 835 reputationPosted Aug 8, 2014, 9:45 PM EDT
I'm taking 2 variables & in that variables stores static ip & start ip
I am not able to divide start ip in 4 parts so tell me how to divide this.
Sanket JainRank #1,789 · 835 reputationPosted Aug 12, 2014, 9:59 PM EDT
Now I want to store that IP's in oracle database
How to generate the middle ip's I can try between operator but it shows wrong output so gives me hints like previous
Guest UserRank #259 · 9.8K reputationPosted Aug 12, 2014, 10:51 PM EDT
i got confused, why do you need BETWEEN sql operator to store data.
user INSERT to store. rite
Sanket JainRank #1,789 · 835 reputationPosted Aug 13, 2014, 9:49 PM EDT
Start ip=192.168.10.1
No. of Static Ip=5
End IP=192.168.10.5
I want to store all 5 ip's in database
i.e. 192.168.10.1 ,
192.168.10.2,
192.168.10.3,
192.168.10.4,
192.168.10.5
so i use between operator i.e between('192.168.10.1','192.168.10.5')
but in insert query we can't use between operator
so gives me hints for that
Guest UserRank #259 · 9.8K reputationPosted Aug 14, 2014, 3:57 PM EDT
i++;
string temp= oct.join(","); //convert it back into e.g., 192.168.1.2 then 192.168.1.3
string sql ="insert into table1 (IPaddress) values (" + temp + ")";
db.Execute (sql);